
estimate is een double en in de map zitten Double's, en de waarde uit de map was een null, achter de java-schermen zorgde het veranderen van Double naar double dus voor 'n nullpointer :-) groetjes Sofie Kenny Billiau wrote:
Intussen blijf ik wel curieus .. dus euhm .. wat is het antwoord?
On Thu, 7 Aug 2008, Sofie Van Landeghem wrote:
Nee, die map is van objecten op doubles, en ik zoek op integer (als object)
Michiel Van Bel wrote:
ehm, die is een map van strings en doubles, en ge haalt er een Integer uit?
Sofie Van Landeghem wrote:
I already found it, but I thought this was pretty odd at first, so who > can tell me what might be going wrong here :
code : Map<Object,Double> die = classifier.distributionForInstance(instance); double estimate = 0.0; if (die != null) { System.out.println("size " + die.size()); estimate = die.get(new Integer(1)); <-- line 94 }
-------------------------------------------------------------------------
output : size 2 java.lang.NullPointerException at > be.svlandeg.pi.classification.JavaMLClassifier.eval(JavaMLClassifier.java:94)
Obviously, "die" is not null... > -Sofie
Binari Is Not A Regular Island Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ================================================================== Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Evolutionary Genomics Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 fax:+32 (0)9 3313809 Website: http://bioinformatics.psb.ugent.be ==================================================================