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

Possible bug in QWeighted algorithm #23

Open
ekyy2 opened this issue Aug 16, 2018 · 0 comments
Open

Possible bug in QWeighted algorithm #23

ekyy2 opened this issue Aug 16, 2018 · 0 comments

Comments

@ekyy2
Copy link

ekyy2 commented Aug 16, 2018

Hi,

I am currently running the quick weighted algorithm (both hard and soft) through meka. I find that for certain datasets (for example medical), I get the following error (the type of base classifier does not seem to make a difference):

java.lang.NullPointerException
at weka.classifiers.trees.J48.distributionForInstance(J48.java:279)
at mulan.classifier.transformation.CalibratedLabelRanking.makePredictionQW(CalibratedLabelRanking.java:230)
at mulan.classifier.transformation.CalibratedLabelRanking.makePredictionInternal(CalibratedLabelRanking.java:98)
at mulan.classifier.MultiLabelLearnerBase.makePrediction(MultiLabelLearnerBase.java:113)
at meka.classifiers.multilabel.MULAN.distributionForInstance(MULAN.java:238)
at meka.classifiers.multilabel.Evaluation.testClassifier(Evaluation.java:530)
at meka.classifiers.multilabel.Evaluation.evaluateModel(Evaluation.java:435)
at meka.classifiers.multilabel.Evaluation.evaluateModel(Evaluation.java:326)
at meka.classifiers.multilabel.Evaluation.runExperiment(Evaluation.java:221)
at meka.classifiers.multilabel.ProblemTransformationMethod.runClassifier(ProblemTransformationMethod.java:172)
at meka.classifiers.multilabel.ProblemTransformationMethod.evaluation(ProblemTransformationMethod.java:152)
at meka.classifiers.multilabel.MULAN.main(MULAN.java:248)

I found that this is because a oneVsOneModel may not be built for all label pairs (i.e. noData = true). So when the following statement in the makePredictionQW and makePredictionQWSoft functions in CalibratedLabelRanking.java is made, it triggers the exception because m_root is a null pointer:

double[] distribution = getOneVsOneModels().getModel(modelIndex).distributionForInstance(transformed);

Any advice would be much appreciated. Thanks!

Regards,
Edward

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

No branches or pull requests

1 participant