Created
May 27, 2016 14:38
-
-
Save OXPHOS/4d58f4371e4e49ae8fbef16d176d8149 to your computer and use it in GitHub Desktop.
with '0' error when making cookbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSVFile f_feats_train("../../data/classifier_4class_2d_linear_features_train.dat") | |
CSVFile f_feats_test("../../data/classifier_4class_2d_linear_features_test.dat") | |
CSVFile f_labels_train("../../data/classifier_4class_2d_linear_labels_train.dat") | |
CSVFile f_labels_test("../../data/classifier_4class_2d_linear_labels_test.dat") | |
#![create_features] | |
RealFeatures features_train(f_feats_train) | |
RealFeatures features_test(f_feats_test) | |
MulticlassLabels labels_train(f_labels_train) | |
MulticlassLabels labels_test(f_labels_test) | |
#![create_features] | |
#![create_instance] | |
QDA qda(features_train, labels_train) | |
#![create_instance] | |
#![train_and_apply] | |
qda.train() | |
MulticlassLabels labels_predict = qda.apply_multiclass(features_test) | |
#![train_and_apply] | |
#![extract_mean_and_cov] | |
int classlabel = 0 | |
RealVector m = qda.get_mean(classlabel) | |
#![train_and_apply] | |
#![evaluate_accuracy] | |
MulticlassAccuracy eval() | |
real accuracy = eval.evaluate(labels_predict, labels_test) | |
#![evaluate_accuracy] | |
# additional integration testing variables | |
RealVector output = labels_predict.get_labels() |
I dont get this in latest develop
EDIT: I do get the error .... on it
See email I wrote to @sorig
One potential fix would be to change t_NUMERAL = "([1-9][0-9]*(\.[0-9]+)?)|0\.[0-9]+"
in generator/parse.py
to t_NUMERAL = "([0-9][0-9]*(\.[0-9]+)?)|0\.[0-9]+"
For now, we can just use class index 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$make cookbook