weka

What is the “seed” in Weka's SimpleKMeans clusterer?

断了今生、忘了曾经 提交于 2019-12-05 03:13:52
问题 I'm using Weka's SimpleKMeans clusterer on a set of data. But I'm unsure what the seed value is, what it does or how it affects the data. i.e. How does a higher or lower seed value affect the result as oppose to the default value of 10? 回答1: Seed is just a random numbers seed. Once seed is fixed, even a randomized algorithm behaves deterministically. KMeans is not deterministic, so if you want repeatable results - you fix a seed. However there is completely no relation between exact value of

Test single instance in weka which has no class label

…衆ロ難τιáo~ 提交于 2019-12-05 02:23:22
问题 This question is being already asked but i didn't understand the answer so I am again posting the question please do reply. I have a weka model eg: j48 I have trained that model for my dataset and now I have to test the model with a single instance in which it should return the class label. How to do it? I have tried these ways: 1)When I am giving my test instance a,b,c,class for class as ?. It is showing problem evaluating classifier .train and test are not compatible 2)When I list all the

How to use pre-trained .model file for predictions in Android Studio?

自闭症网瘾萝莉.ら 提交于 2019-12-05 02:16:47
问题 I have trained a Decision Table ML model in Weka 3.8 Dekstop Version. I have saved the model accordingly in my assets folder and configured the wekaSTRIPPED.jar file as well. At this point, the build seems to be working fine on Android Studio. However, when I try to use the classification model in Java, I am getting some red highlights - errors - over my code which I am unable to autofix. I have visited some online guides here and visited this commonly used weka-android reference here and

ERROR While using WEKA API in java code: Class Attribute Not Set?

心已入冬 提交于 2019-12-05 00:53:13
I'm trying to use weka API in my java code. I use J48 tree classification to Classify my dataset in MySQL database, but I have this error: Trying to add database driver (JDBC): RmiJdbc.RJDriver - Error, not in CLASSPATH? Trying to add database driver (JDBC): jdbc.idbDriver - Error, not in CLASSPATH? Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Error, not in CLASSPATH? Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLASSPATH? weka.core.UnassignedClassException: weka.classifiers.trees.j48.C45PruneableClassifierTree: Class attribute not set! at weka

How to retrieve class values from WEKA using MATLAB

﹥>﹥吖頭↗ 提交于 2019-12-04 23:54:10
问题 I'm trying to retrieve classes from WEKA using MATLAB and WEKA API. All looks fine but classes are always 0. Any idea ?? My data set has 241 atributes, applying WEKA to this dataset I'm obtaining correct results. 1st train and test objects are created than classifier is build and classifyInstance performed. But this give wrong result train = [xtrain ytrain]; test = [xtest]; save ('train.txt','train','-ASCII'); save ('test.txt','test','-ASCII'); %## paths WEKA_HOME = 'C:\Program Files\Weka-3-7

Unable to access training dataset for ML classification using Weka in Java

坚强是说给别人听的谎言 提交于 2019-12-04 21:04:14
I am trying to classify an instance using Weka in Java (specifically Android Studio). Initially, I saved a model from the Desktop Weka GUI and tried to import it into my project directory. If I am correct, this won't work because the Weka JDKs are different on PC versus Android. Now I am trying to train a model on the Android itself (as I see no other option) by importing the training dataset. Here is where I am running into problems. When I run "Test.java," I get this error saying that my source hasn't been specified pointing to line 23 where I invoke the .loadDataset method. java.io

Predicting text data labels in test data set with Weka?

拟墨画扇 提交于 2019-12-04 19:09:39
I am using the Weka gui to train a SVM classifier (using libSVM) on a dataset. The data in the .arff file is @relation Expandtext @attribute message string @attribute Class {positive, negative, objective} @data I turn it into a bag of words with String-to-Word Vector, run SVM and get a decent classification rate. Now I have my test data I want to predict their labels which I do not know. Again it's header information is the same but for every class it is labeled with a question mark (?) ie 'Musical awareness: Great Big Beautiful Tomorrow has an ending\u002c Now is the time does not', ? Again I

Java: How can I assemble/create a single instance for classification using a Weka generated model?

三世轮回 提交于 2019-12-04 18:46:15
I've been searching for an answer to this for a while to no avail. First a bit of background: I'm trying to create an AI for robocode using Weka. I'm first logging the required data from a manual robot to an ARFF file, this is working as it should. This data is then processed this using Weka and a model created, I'm then saving this file. I can successfully import the model and classify a dataset that has been imported from another arff file and use the results. What I want to do now is every time the game status changes is assemble an instance and classify it, to decide for example which way

Does anyone know how to generate AUC/Roc Area based on the predition?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 17:21:33
I know the AUC/ROC area ( http://weka.wikispaces.com/Area+under+the+curve ) in weka is based on the e Mann Whitney statistic ( http://en.wikipedia.org/wiki/Mann-Whitney_U ) But my doubt is, if I've got 10 labeled instances (Y or N, binary target attribute), by applying an algorithm (i.e. J48) onto the dataset, then there are 10 predicted labels on these 10 instances. Then what exactly should I use to calculate the AUC_Y, AUC_N, and AUC_Avg? Use the prediction's ranked label Y and N or the actual label (Y' and N')? Or I need to calculate the TP rate and FP rate? Can anyone give me a small

.arff files with scikit-learn?

こ雲淡風輕ζ 提交于 2019-12-04 11:49:10
问题 I would like to use an Attribute-Relation File Format with scikit-learn to do some NLP task, is this possible? How can use an .arff file with scikit-learn ? 回答1: I really recommend liac-arff. It doesn't load directly to numpy, but the conversion is simple: import arff, numpy as np dataset = arff.load(open('mydataset.arff', 'rb')) data = np.array(dataset['data']) 回答2: I found that scipy has a loader for arff files to load them as numpy record arrays. I am not 100% sure that those arrays are