1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-28 13:48:56 +08:00

replace output \n with \r when training knn

This commit is contained in:
FrozenKP 2017-06-06 23:02:37 +08:00
parent 78456c5bd6
commit a08194b3e9

View File

@ -196,7 +196,7 @@ func (KNN *KNNClassifier) Predict(what base.FixedDataGrid) (base.FixedDataGrid,
what.MapOverRows(whatAttrSpecs, func(predRow [][]byte, predRowNo int) (bool, error) {
if (curRow%1) == 0 && curRow > 0 {
fmt.Printf("KNN: %.2f %% done\n", float64(curRow)*100.0/float64(maxRow))
fmt.Printf("KNN: %.2f %% done\r", float64(curRow)*100.0/float64(maxRow))
}
curRow++