weka

Print out prediction with WEKA in Java

时光怂恿深爱的人放手 提交于 2019-12-11 16:16:39
问题 I am trying to make a prediction with Weka in Java, using the Naive Bayes Classifier, with the following code: JAVA public class Run { public static void main(String[] args) throws Exception { ConverterUtils.DataSource source1 = new ConverterUtils.DataSource("./data/train.arff"); Instances train = source1.getDataSet(); // setting class attribute if the data format does not provide this information // For example, the XRFF format saves the class attribute information as well if (train

The confidence level of each specific instance in WEKA?

六月ゝ 毕业季﹏ 提交于 2019-12-11 15:04:12
问题 I'm new to WEKA and machine learning in general. I have a test set with about 6500 instances. I have a model that has already been trained with a training set. Once I run the test set through the saved model, is there a way I can extract the confidence level of each specific instance? By confidence level, I mean a numerical value that expresses the probability that the classifier has classified a specific instance correctly. I want this confidence number for each instance in the file. Is

i cant visualize Decision Tree for my id3 classifier in weka . what should i do?

混江龙づ霸主 提交于 2019-12-11 14:28:59
问题 i cant visualize Decision Tree for my id3 classifier in weka .for mushroom.arff i have preprocessed data by deleting attributes containing empty instances and after i have applied id3 classifier but unable to visulize tree. 回答1: According to Technobium.com For the moment, the platform does not allow the visualization of the ID3 generated trees. 来源: https://stackoverflow.com/questions/50099119/i-cant-visualize-decision-tree-for-my-id3-classifier-in-weka-what-should-i-do

Preserve Order for Cross Validation in Weka

岁酱吖の 提交于 2019-12-11 14:08:58
问题 I am using the Weka GUI for classifying sensor data. I have measures of 10 people, the data is sorted. So the first 10% correspond to participant 1, the second 10% to participant 2 etc. I would like to use 10 fold cross validation to build a model on 9 participants and test it on the remaining participant. In my case I believe I could accomplish this by simply not randomizing the data splits. How would I best go about doing this? 回答1: I don't know how to do this in the Explorer. In the

Convert Weka tree into hierachyid for SQL hierachical table

浪子不回头ぞ 提交于 2019-12-11 12:15:42
问题 This question relates to the answer given in this post. I want to convert the output from a tree analysis in Weka into a hierarchical table of decision splits and leaf-values (as per the post linked above). I can parse the Weka output to extract the fac , split and val values but I'm struggling to parse the output and generate the correct hierachyid values. First thing I note is that the tree description don't map one-to-one with the records in decisions . There are 20 lines in the Weka

Using weka in C#: Unable to cast object of type 'java.util.ArrayList' to type 'System.Collections.Generic.List`

﹥>﹥吖頭↗ 提交于 2019-12-11 11:58:40
问题 I am currently working on a project in which I need to use FP-Growth algorithm. I know Weka is a handy tool for it. However, I am using C# for coding (due to some other libraries I need). So, I converted weka.jar to weka.dll using IKVM.NET . Below is a code snippet that i have written: FPGrowth FPMiner = new FPGrowth(); FPMiner.buildAssociations(dataset); AssociationRules rules = FPMiner.getAssociationRules(); List<AssociationRule> rule = rules.getRules(); This gives me an error as: Cannot

Convert NA values to ? automatically while loading

南楼画角 提交于 2019-12-11 10:48:32
问题 Is there a way to automatically convert NA values to ? in weka while loading .csv files? Or do we have to use some other script/program to either replace them with ? or a blank space before loading into weka. Any help or suggestions are welcome. Thanks 回答1: Unfortunately I do not believe Weka has a way to do this conversion. This is the case because Weka's native format is .arff files. In .arff files, missing values are denoted with a "?". When a .csv file is loaded, it expects missing values

Clustering of images to evaluate diversity (Weka?)

五迷三道 提交于 2019-12-11 10:43:24
问题 Within a university course I have some features of images (as text files). I have to rank those images according to their diversity.# The idea I have in mind is to feed a k-means classifier with the images and then compute the euclidian-distance from the images within a cluster to the cluster's centroïd. Then do a rotation between clusters and take always the (next) closest image to the centroïd. I.e., return closest to centroïd 1, then closest to centroïd 2, then 3.... then second closest to

Convert CSV in ARFF in android

妖精的绣舞 提交于 2019-12-11 07:32:58
问题 i have a cvs file that i want to convert in arff format. I add this external jar in my build path and in libs/: weka-3.6.6-android.jar My cvs file not have header row and it is like this: 0.56024569272995,0.34556102752685547,0.4986509583393733,0.025362752945036676,0.4992934039810014,0.56024569272995,0.34556102752685547,0.4986509583393733,0.025362752945036676,0.4992934039810014,0.56024569272995,0.34556102752685547,0.0,0.500127645839251,0.4992934039810014 0.5616480112075806,0.33134251832962036

Input arff file for Weka Apriori

≯℡__Kan透↙ 提交于 2019-12-11 07:22:14
问题 I am trying to do association mining on version history. I have my transaction data in mysql. Weka apriori algorithm requires arff or csv file in a certain format. It has to have columns for each item. The values will be specified as TRUE or FALSE for each item in a transaction. I am looking for a way to create this file using Weka InstanceQuery. Also what are the options if the transaction data is huge. 回答1: I can answer for the second part: options if the transaction data is huge. Weka is a