Re: How to write Entropy class in java?
please help me in calling the entropy method
I don't know how to call this method inside my code, I have read a file (arff) file in my code and I am using weka package to run some classifiers over my file but I don't know how to calculate a class entropy for the classes inside my file
please help
Re: How to write Entropy class in java?
Please don't hijack someone else's post. I have moved your post to its own thread.
Now to your problem, what have you tried? You don't give us much information, and weka is a 3rd party library that probably few of us here have experience with. I'd recommend posting an SSCCE, a link to the 3rd party API, and in specific terms describe what you are trying to accomplish.
Trying to calculate class entropy for classes defind file using weka package
Can Any body help me in this
I need to implement all classifiers that are defined in weka on my file
I have read the file:
// Read all the instances in the file (ARFF, CSV, XRFF, ...)
Code java:
DataSource source = new DataSource("iris.arff");
Instances instances = source.getDataSet();
// Make the last attribute be the class
instances.setClassIndex(instances.numAttributes() - 1);
// now I need to calculate the class entropy of the classes which is already known to the java enviroment (becuase I assigned the index as the last one of the attribute) ????
please help me as I need it for my work urgently
Re: How to write Entropy class in java?
Please don't start new threads referring to the same question. I have merged your two threads. And please don't mention urgency - it is all relative...everyone's post is urgent to them, and saying your is more so appears selfish and does not do you any favors in receiving help
To address your question - take a look at the ContingencyTables class in weka.