Skip to content
Snippets Groups Projects
Commit 9aa4fc81 authored by Fabian Poker's avatar Fabian Poker
Browse files

Refactoring fixed

parent b78350a3
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ def evaluate():
weights = [random.random() for _ in features]
threshold = 0.5
perceptron = Perceptron(weights, threshold, numpy.tanh)
train(perceptron, training_data, 10000, 0.1)
train(perceptron, training_data, 100, 0.1)
fehlerrate = MulticlassErrorRate()
for features, correct_class in test_data:
result = perceptron.classify(features)
......
......@@ -37,7 +37,9 @@ def get_evaluation_data(window_size, feature_list: list):
for bewegungs_name, bewegungs_klasse in bewegungs_list:
feature_vectors = get_feature_vector(bewegungs_name, feature_list, window_size)
training, test = label_testdata(feature_vectors, bewegungs_klasse, DATA_LIMIT)
training_data += training
test_data += test
for t in training:
training_data.append((list(t[0][0]), t[1]))
for t in test:
test_data.append((list(t[0][0]), t[1]))
return test_data, training_data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment