mirror of
https://github.com/3x4byte/StreetsignRecognition.git
synced 2025-12-22 01:45:52 +00:00
evaluator with evaluated data
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import csv
|
||||
import os
|
||||
from random import randint
|
||||
import random
|
||||
|
||||
from classes.learner import Learner
|
||||
from classes.concept import Concept
|
||||
|
||||
all_data = os.path.abspath(os.path.join(__file__, "..", "all_feature_vectors.csv"))
|
||||
path_to_data = os.path.abspath(os.path.join(__file__, "..", "..", "data"))
|
||||
training = os.path.abspath(os.path.join(__file__, "..", "training.csv"))
|
||||
testing = os.path.abspath(os.path.join(__file__, "..", "testing.csv"))
|
||||
|
||||
@@ -22,6 +24,8 @@ def split_all_data(all_data_path: str, future_training_path: str, future_testing
|
||||
else:
|
||||
testing_data.append(row)
|
||||
|
||||
random.shuffle(training_data)
|
||||
random.shuffle(testing_data)
|
||||
with open(future_training_path, 'w') as csv_file:
|
||||
writer = csv.writer(csv_file, delimiter=";")
|
||||
writer.writerow(['filename','concept', 'vector'])
|
||||
|
||||
Reference in New Issue
Block a user