Skip to content

Commit

Permalink
Fix/fix perceptron issues (#4146)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Navarro authored and karlnapf committed Feb 5, 2018
1 parent 91adea7 commit daa95fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 88 deletions.
2 changes: 1 addition & 1 deletion data
18 changes: 8 additions & 10 deletions examples/meta/src/binary/perceptron.sg
Expand Up @@ -10,26 +10,24 @@ BinaryLabels labels_train(f_labels_train)
BinaryLabels labels_test(f_labels_test)
#![create_features]

#![set_parameters]
real learn_rate = 1.0
int max_iter = 1000
#![set_parameters]

#![create_instance]
real learn_rate=1.0
int max_iter=1000
Perceptron perceptron(features_train, labels_train)
perceptron.set_learn_rate(learn_rate)
perceptron.set_max_iter(max_iter)
#![create_instance]

#![train_and_apply]
perceptron.train()
BinaryLabels labels_predict = perceptron.apply_binary(features_test)
perceptron.set_features(features_test)
Labels labels_predict = perceptron.apply()
#![train_and_apply]

#![extract_weights_bias]
RealVector w = perceptron.get_w()
real b = perceptron.get_bias()
#![extract_weights_bias]
#![extract_weights]
RealVector weights = perceptron.get_w()
real bias = perceptron.get_bias()
#![extract_weights]

#![evaluate_accuracy]
AccuracyMeasure eval()
Expand Down
35 changes: 0 additions & 35 deletions examples/meta/src/neural_nets/classification_perceptron.sg

This file was deleted.

42 changes: 0 additions & 42 deletions examples/undocumented/python/classifier_perceptron.py

This file was deleted.

0 comments on commit daa95fa

Please sign in to comment.