You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
567 B

package main
import (
"fmt"
"strconv"
)
func main() {
dataset := readDataset("datasets/poker/poker-hand-training-true.data", "\n", ",")
//fmt.Println(dataset)
inputs := readInputs("datasets/prova.data", "\n", ",")
//fmt.Println(inputs)
var datasetDistances [][][]float64
for k, input := range inputs {
datasetDistances = euclideanDistance(dataset, input)
r := getShortestDistance(datasetDistances)
fmt.Println("iteration " + strconv.Itoa(k))
fmt.Println(input)
fmt.Println(r)
fmt.Print("result: ")
fmt.Println(r[1])
fmt.Println("---")
}
}