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.

19 lines
460 B

  1. package main
  2. import "fmt"
  3. func main() {
  4. dataset := readDataset("datasets/poker/poker-hand-training-true.data", "\n", ",")
  5. //fmt.Println(dataset)
  6. inputs := readInputs("datasets/prova.data", "\n", ",")
  7. //fmt.Println(inputs)
  8. var datasetDistances [][][]float64
  9. for _, input := range inputs {
  10. datasetDistances = euclideanDistance(dataset, input)
  11. r := getShortestDistance(datasetDistances)
  12. fmt.Println(input)
  13. fmt.Println(r)
  14. fmt.Println(r[1])
  15. }
  16. }