Jelajahi Sumber

sad and apologetic commit

Ethan Goldfarb 6 tahun lalu
induk
melakukan
b5ee3ca844

+ 9 - 5
ethan_data_processing_scripts/Vector.py

@@ -3,6 +3,8 @@ try:
 except ImportError:
     import pickle
 import sample
+import typing
+from typing import List
 
 
 class FeatureVector:
@@ -66,11 +68,13 @@ def readPickledData(filename):
 
 def main():
     fv = FeatureVector()
-    writePickledData("test.bin")
-    readPickledData("test.txt")
-    s = sample.Sample(3)
-
-    fv = SampleToFeatureVector()
+    # writePickledData("test.bin")
+    # readPickledData("test.txt")
+    s = sample.Sample([{"delta": 0, "time": '09/19/18 13:55:26', }], open("./results.txt"))
+    s.dead_time = 30
+    s.average_iat = 3
+    s.total_time = 30
+    fv = SampleToFeatureVector(s)
 
 
 if __name__ == '__main__':

+ 2 - 0
ethan_data_processing_scripts/runtests.py

@@ -1,6 +1,7 @@
 import sys
 import Vector
 import sample
+import nearestneighbors
 
 
 # test classifications on a pickled file of samples and denoting active features with
@@ -21,6 +22,7 @@ def main():
             temp.append(f.sampleInfo[s])
         f.activefeatures = temp
     # perform classification on f here
+    nearestneighbors.kNearestNeighbors()
 
 
 if __name__ == '__main__':