1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-05-01 22:18:10 +08:00

Merge pull request #182 from FrozenKP/master

A small change to make output more beautiful when training knn.
This commit is contained in:
Richard Townsend 2017-06-16 16:59:23 +01:00 committed by GitHub
commit 36b3100546

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++