Ethan Goldfarb 6 年 前
コミット
cb943b007e

+ 6 - 1
ethan_data_processing_scripts/README.md

@@ -6,4 +6,9 @@ Data and Testdata should be arrays of arrays of features, ex:
 
 Suppose there are 3 features, each a float from 0 to 1. Data could be: [[.3, .2, .3], [.3, .3, .3], [.3, .4, .5]...]
 
-Results should be ints in an array, each result accoring to the list of features it should represent the classification of.
+Results should be ints in an array, each result accoring to the list of features it should represent the classification of.
+
+### Plan for classifier.py
+
+Make a command line utility that reads in samples, transforms them to FeatureVectors and then runs a number of
+classifications on them.

+ 1 - 1
ethan_data_processing_scripts/nearestneighbors.py

@@ -5,7 +5,7 @@ import numpy as np
 def main():
     # a test of this method using an arbitrarily generated list of 5 vectors with 3 features each
     # nearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], [[1, 1, 4]])
-    kNearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], [1, 2, 3, 4], [[1, 1, 0], [0, 5, 5]])
+    kNearestNeighbors([[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 5, 5]], ["three", 2, 3, "5"], [[1, 1, 0], [0, 5, 5]])
 
 
 def kNearestNeighbors(data: list, classifications: list, test_data: list):