weka - failed to make a prediction

Bob Matthews <[email protected]> Wed, 13 Jul 2022 20:32:19 +1200
Newsgroups gmane.comp.ai.weka
Message-ID <[email protected]>
I have some java code which attempts to

1) calculate an input variable OSV

2) call a weka model

3) make a prediction

***********************

here is the code involved:-

OSV=((newEvent_b_startPrice-PDCC)/PDCC)/btheta;

// [c] run Weka, create new Instance and make prediction for BBTheta
WekaAppwekaApp=newWekaApp();
// this should only be called once (or whenever the model has changed 
and needs reloading)
try{
wekaApp.init();
}
catch(Exceptione){
System.out.println("ERROR init: "+e);
e.printStackTrace(myConsole.getOut());// show the stack trace
}
// make a prediction
try{
intpred=wekaApp.currentInstance(OSV);
if(pred!=-1)
myConsole.getOut().println("Predicted label: "+wekaApp.getLabel(pred));
else
myConsole.getOut().println("Failed to make prediction!");
}
catch(Exceptione){
System.out.println("ERROR predict: "+e);
e.printStackTrace(myConsole.getOut());// show the stack trace
}
myConsole.getOut().println("Weka finished");

***********************************
and here is the console output (to be read from bottom to top):-



TIME 	MESSAGES
2022-07-13 08:29:00 	Weka finished
2022-07-13 08:29:00 	Failed to make prediction!
2022-07-13 08:29:00 	OSV just before weka needs it: -0.9987016878058906
2022-07-13 08:29:00 	at java.base/java.lang.Thread.run(Thread.java:833)
2022-07-13 08:29:00 	at com.dukascopy.api.impl.execution.f$a.run(L:926)
2022-07-13 08:29:00 	at com.dukascopy.api.impl.execution.f$a.f(L:904)
2022-07-13 08:29:00 	at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2022-07-13 08:29:00 	at com.dukascopy.api.impl.execution.m.call(L:23)
2022-07-13 08:29:00 	at com.dukascopy.api.impl.execution.m.cu(L:63)
2022-07-13 08:29:00 	at com.dukascopy.api.impl.execution.m.dw(L:85)
2022-07-13 08:29:00 	at 
us_copiosus_EURNZD_TSFDC_Up_Live_2022_Testing8.onBar(us_copiosus_EURNZD_TSFDC_Up_Live_2022_Testing8.java:286) 

2022-07-13 08:29:00 	at 
us_copiosus_EURNZD_TSFDC_Up_Live_2022_Testing8$WekaApp.init(us_copiosus_EURNZD_TSFDC_Up_Live_2022_Testing8.java:489) 

2022-07-13 08:29:00 	at 
weka.core.SerializationHelper.readAll(SerializationHelper.java:380)
2022-07-13 08:29:00 	at 
weka.core.SerializationHelper.readAll(SerializationHelper.java:399)
2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:472)
2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:514)
2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1742) 

2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2209) 

2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1907) 

2022-07-13 08:29:00 	at 
java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2043) 

2022-07-13 08:29:00 	at 
weka.core.SerializationHelper$1.resolveClass(SerializationHelper.java:363)
2022-07-13 08:29:00 	java.lang.ClassNotFoundException: Unable to find 
class weka.classifiers.meta.AutoWEKAClassifier
2022-07-13 08:29:00 	new OSV: -0.9987016878058906

Any help in understanding the problem gratefully received
Bob M

_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html