Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in when training set numlasses != test set numClasses #12

Open
GoogleCodeExporter opened this issue Mar 21, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hope I'm not missing something basic.

What steps will reproduce the problem?
1. //Create a test set with a different number of classes as a training set
2. cls.buildClassifier(trainData);
3. Evaluation eval = new Evaluation(trainData);
4. eval.evaluateModel(cls, testData);

What is the expected output? What do you see instead?

Expected to complete evaluation successfully uith no output.

Instead, step 4 gives exception:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 13
    hr.irb.fastRandomForest.FastRfBagging.distributionForInstance(FastRfBagging.java:647)
    hr.irb.fastRandomForest.FastRandomForest.distributionForInstance(FastRandomForest.java:644)
    weka.classifiers.evaluation.Evaluation.evaluationForSingleInstance(Evaluation.java:1937)
    weka.classifiers.evaluation.Evaluation.evaluateModelOnceAndRecordPrediction(Evaluation.java:1976)
    weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1854)
    weka.classifiers.Evaluation.evaluateModel(Evaluation.java:671)
    cf.PortClassifier.main(PortClassifier.java:85)

    at hr.irb.fastRandomForest.FastRfBagging.distributionForInstance(FastRfBagging.java:647)
    at hr.irb.fastRandomForest.FastRandomForest.distributionForInstance(FastRandomForest.java:644)
    at weka.classifiers.evaluation.Evaluation.evaluationForSingleInstance(Evaluation.java:1937)
    at weka.classifiers.evaluation.Evaluation.evaluateModelOnceAndRecordPrediction(Evaluation.java:1976)
    at weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1854)
    at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:671)
    at cf.PortClassifier.main(PortClassifier.java:85)



What version of the product are you using? On what operating system?
0.99 on Ubuntu 14.04

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 16 Jan 2015 at 4:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant