weka

Different results in Weka GUI and Weka via Java code

被刻印的时光 ゝ 提交于 2019-12-20 02:51:46
问题 I'm applying a text classification in Weka using NaiveBayesMultinomialText classifier. The problem is that when I use the GUI to do it and test on the same train data (without cross validation) I get 93% acurracy, and when I try do it via java code I get 67% acurracy. What might be wrong? In GUI, I'm using the following configuration: Lnorm 2.0 debug False lowercaseTokens True minWordFrequency 3.0 norm 1.0 normalizeDocLength False periodicPruning 0 stemmer NullStemmer stopwords pt-br

Weka predict classifcation node

别等时光非礼了梦想. 提交于 2019-12-19 10:49:08
问题 I have created a huge j48 tree of size around 7000 with so many branches and leaves. I am getting classification result as well for test images. I would like to know which of the node is making the classification for each result. In other words, Is there a way with weka to see the id or something of the leaf node that makes the decision. 回答1: As far as I know, you will not be able to do this from the Weka GUI. However, if you use the Weka API there is some hope . I am not an expert in Java,

K-means with really large matrix

落爺英雄遲暮 提交于 2019-12-18 15:48:33
问题 I have to perform a k-means clustering on a really huge matrix (about 300.000x100.000 values which is more than 100Gb). I want to know if I can use R software to perform this or weka. My computer is a multiprocessor with 8Gb of ram and hundreds Gb of free space. I have enough space for calculations but loading such a matrix seems to be a problem with R (I don't think that using the bigmemory package would help me and big matrix use automatically all my RAM then my swap file if not enough

Method undefined for type Java

倖福魔咒の 提交于 2019-12-18 09:46:23
问题 Having real trouble figuring out where i'm going wrong on this one. Building a system using WEKA in java to study associations and am trying to implement the Apriori algorithm. Currently this is the code: package model; import weka.associations.*; import weka.core.Instances; import weka.core.converters.ConverterUtils.DataSource; public class Apriori { public static void main(String args[]) throws Exception { String dataset = "/Users/andrew/workspace/Movies/src/data/tagsfinal.arff"; DataSource

Weka ignoring unlabeled data

谁说胖子不能爱 提交于 2019-12-18 08:55:45
问题 I am working on an NLP classification project using Naive Bayes classifier in Weka. I intend to use semi-supervised machine learning, hence working with unlabeled data. When I test the model obtained from my labeled training data on an independent set of unlabeled test data, Weka ignores all the unlabeled instances. Can anybody please guide me how to solve this? Someone has already asked this question here before but there wasn't any appropriate solution provided. Here is a sample test file:

Increase heap to avoid Out of Memory Error in WEKA

你。 提交于 2019-12-18 08:46:31
问题 I am trying to run a classifier in WEKA, using a J48 classifier using the following command line: $ java -Xmx2048m -cp /home/weka-3-7-9/weka.jar weka.classifiers.trees.J48 -t input.arff -i -k -d J48-data.model & Although the size of my arff is 43.8 M, and I aumented the heap space to 2048m, I still received the following errors: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.ArrayList.<init>(ArrayList.java:132) at weka.core.Instances.initialize(Instances

Weka Predictions to CSV

风格不统一 提交于 2019-12-18 05:48:06
问题 I've trained a classifier in Weka, and I'm able to use it on test data. Additionally, I can opt to display the classifier's predictions in the log window for this test data. However, for my current project, it would be convenient for me to be able to get this data in CSV format. Is this possible in Weka ? Is it only possible when using the command line (something I'll eventually move towards) ? I could always save the entire buffer result to a text file, but in that case, I would have to

Visualizing Weka classification tree

做~自己de王妃 提交于 2019-12-17 22:38:26
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 7 years ago . I am using few data sets available online and trying to visualize tree. However, it does not let me visualize tree option at all. Could anyone please guide me how to get the tree diagram in weka by using data sets available online? 回答1: Look here http://maya.cs.depaul.edu/classes/ect584/weka/classify.html, for example. First you have to fit your decision tree (I used the J48

How to use LibSVM with Weka in my Java code?

随声附和 提交于 2019-12-17 16:18:27
问题 I want to use LibSVM classifier with Weka in my application. How can I (or where can I find good examples to) do this? 回答1: A little late now, surely, but I'll answer anyways. You have to use weka.jar, libsvm.jar, and wlsvm.jar (the libsvm wrapper) in your project. So just include all 3 jars in your build path or class path or whatever. You can get the wlsvm.jar from here: http://ailab.ist.psu.edu/yasser/wlsvm.html You can get weka from here: http://www.cs.waikato.ac.nz/ml/weka/ And you can

Cross Validation in Weka

风格不统一 提交于 2019-12-17 15:44:08
问题 I've always thought from what I read that cross validation is performed like this: In k-fold cross-validation, the original sample is randomly partitioned into k subsamples. Of the k subsamples, a single subsample is retained as the validation data for testing the model, and the remaining k − 1 subsamples are used as training data. The cross-validation process is then repeated k times (the folds), with each of the k subsamples used exactly once as the validation data. The k results from the