Well I'm calling SMOTE filter(WeKa) in my algorithm in MOA, it works fine
for some datasets but for some specific datasets it throws an exception
java.lang.IllegalArgumentException: Comparison method violates its general
at java.util.TimSort.mergeLo(Unknown Source)
at java.util.TimSort.mergeAt(Unknown Source)
at java.util.TimSort.mergeForceCollapse(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.Collections.sort(Unknown Source)
I went through some java forums which gave me pointers here
But i dont know how to get away with this problem...it will be great if
someone could help me out of this.
----- Abhijeet Godase.
The number of support vectors arenot available in Libsvm package in Weka. Please help me how can take number of support vectors for different types SVM as one-class svm, C-SVC and so on.
In the following code I initialize my classifier as K2 but I cant find how
to set estimator in the code using setScoreType(SelectedTag)
can you provide me the details to specify it.
public static void main(String args)
Instances train =
Instances test =
train.setClassIndex(train.numAttributes() - 1);
test.setClassIndex(test.numAttributes() - 1);
BayesNet myBayes = new BayesNet();
K2 myK2= new K2();
< myK2.setScoreType( ); <------------------ How to declare it?
Evaluation eval = new Evaluation(train);
From: Noushin Rezapour Asheghi
Sent: 12 July 2012 12:52
Subject: liblinear feature weights
I have used liblinear in weka for classification and now I want to see the feature weights in the output too. The reason is that I want to know which features are important for which classes. Please Please help me with this problem.
Many thanks in advance,
Thanks Thomas for the reply. I was reading the paper, Instance-based
learning algorithm by Aha and Kibler (1991), that Weka IB1 and IBk
classifiers implement. My impression was that in the paper, IB1, IB2, and
IB3 refer to three different instance-based algorithms. My guess was
that I could specify the number of neighbors, k, for each of these algorithms.
In other words, the number in the names IB1, IB2, and IB3 in the paper
does not seem to correspond with the number of neighbors I choose but
denote the three variations. So, which algorithm could the Weka IBk
implementation be? Maybe I should look at the code long enough to figure
> you can specify the number of Nearest Neighbours, which choice exactly
> makes you use IB1, IB2 etc.
> 2009/5/13 Li Yang <lyshane(a)umich.edu>
>> Dear Weka experts,
>> I was just wondering whether the IBk classifier implements the IB1, IB2, or
>> IB3 algorithm in Aha and Kibler's article, Instance-based learning algorithm
>> Thank you in advance for your help.
>> Wekalist mailing list
>> Send posts to: Wekalist(a)list.scms.waikato.ac.nz
>> List info and subscription status:
>> List etiquette:
> Departement of Knowledge Engeneering
> Faculty of Humanities & Science
> Maastricht University
I am using weka 3.6 API programatically for association rule mining using apriori. Essentially, I am doing market
basket analysis for an electronic store. I have 7 attributes as follows with values as either "Y" or "N", depending
on whether an item is present or not in a transaction.
An example instance is
"Y", "Y", "Y", "N","N", "N", "N"
My problem is that rules seem to be dominated by the negatively correlated attributes, which is understandable.
Here are the top 5 rules I got
1. hdtv=N tv_stand=N 9 ==> lap_top=Y 9 conf:(1)
2. lap_top=Y hdtv=N 9 ==> tv_stand=N 9 conf:(1)
3. anti_virus_software=Y connector_cable=N 8 ==> lap_top=Y 8 conf:(1)
4. anti_virus_software=Y tv_stand=N 8 ==> lap_top=Y 8 conf:(1)
5. hdtv=N connector_cable=N 8 ==> lap_top=Y 8 conf:(1)
I am more interested in rules based on positive correlation. In the result above, I am not interested in rules 1, 2 and 5.
How do I get rid of them. Will it help to replace "N" with missing value. How do I specify missing value when I create instances
I would appreciate any help
Hotmail: Trusted email with powerful SPAM protection.
I can see that weka.core.ContingencyTables class calculates various
statistics about a dataset (e.g. conditional entropy of row=feature given a
Is there a class that would 'implement' this class that would just output
these statistics without running any classifier algorithm (e.g. J48 that
uses conditional entropies to calculate information gain)?
I am a Java rookie so for any help big or little I would be grateful!
Thanks, Harri S
I'm reading the learned model into an
ObjectInputStream object and creating a Classifier
from it. Then I'm creating an Instance with a,b,c as
variables and setting y=0 which is the classifier
Then I'm running
clsLabel = aClassifier.classifyInstance(anInstance);
If I use LinearRegression, this is working fine. But,
if I use a MultilayerPerceptron classifier, I'm
getting an error:
Exception in thread "main"
weka.core.UnassignedDatasetException : Instance
doesn't have access to a dataset!
Do I need to do something different for
Can anyone tell me where I'm going wrong ?
Is there some support in WEKA for to get attribute weights from a
trained classifier? In particular I would like to have the weights for
RandomForest, M5P, SMO, and SMOreg.
I need this for computing the applicability domain of instances, which
is working much better if you know which attributes the classifier is
actually using, and how 'important' each attribute is.
If I'd have to implement that myself, I would proceed as follows
(could you comment if that makes sense for you?):
I would compute the weight for each attribute in a single tree, by
simply summing up the number of training instances in the nodes that
use this attribute. Then you would have to average the weights over
Similar to RandomForest. Apart from that there is only a single Tree,
and there are rules in the leafs. Again I would compute the weight by
summing up the number of training instances in the nodes (using this
attribute), and add the number of training instances of the leafs
(using this attribute, divided by the number of attributes used in the
rule of that leaf).
Using the square of the weight assigned by the SVM (along the lines of
the SVMAttributeEval class).
Same as for SMO, as I am using the PolyKernel that provides weights.
Am I making sense?
Dipl-Inf. Martin Gütlein
+49 (0)761 203 8442 (office)
+49 (0)177 623 9499 (mobile)
I've attached a screen shot of weka 3.7.4 (but have also checked 3.7.5)
showing that there doesn't seem to be a way of specifying the algorithms to
use for ensemble selection (weka.classifiers.meta.EnsembleSelection). If
run in this mode 'default' algo's are selected. In previous versions of
weka you could build your own library.
I saw an old issue with ensemble selection but this was back in 2007 - is
this the same thing or something else? It could be my environment but I've
tried on two different machines with the same result.
For all your kids (or young at heart) gift needs visit
Tested on Children we believe is the Funnist Internet Based Toy Shop in the
world and we not only give you all the top branded products but also help
you discover products that you never knew existed.