j48

weka.core.UnsupportedAttributeTypeException: weka.classifiers.trees.j48.C45PruneableClassifierTree: Cannot handle string attributes

不打扰是莪最后的温柔 提交于 2020-01-06 15:25:09
问题 I have the following code : #load required library library(data.tree) library(entropy) library(RWeka) library(partykit) library(FSelector) library(e1071) library(caret) library(RWekajars) #Load dataset rest_contries <- fromJSON("https://restcountries.eu/rest/v1/all") View(rest_contries) class(rest_contries) dim(rest_contries) cleaned_rest_countries <- rest_contries[,c(1,2,5,6)] View(cleaned_rest_countries) #================ J48 Algorithm ================================================= m <-

weka.core.UnsupportedAttributeTypeException: weka.classifiers.trees.j48.C45PruneableClassifierTree: Cannot handle string attributes

半城伤御伤魂 提交于 2020-01-06 15:25:09
问题 I have the following code : #load required library library(data.tree) library(entropy) library(RWeka) library(partykit) library(FSelector) library(e1071) library(caret) library(RWekajars) #Load dataset rest_contries <- fromJSON("https://restcountries.eu/rest/v1/all") View(rest_contries) class(rest_contries) dim(rest_contries) cleaned_rest_countries <- rest_contries[,c(1,2,5,6)] View(cleaned_rest_countries) #================ J48 Algorithm ================================================= m <-

How to build a good training data set for machine learning and predictions?

倖福魔咒の 提交于 2019-12-12 09:01:28
问题 I have a school project to make a program that uses the Weka tools to make predictions on football (soccer) games. Since the algorithms are already there (the J48 algorithm), I need just the data. I found a website that offers football game data for free and I tried it in Weka but the predictions were pretty bad so I assume my data is not structured properly. I need to extract the data from my source and format it another way in order to make new attributes and classes for my model. Does

Properties and their values out of J48 tree (RWeka)

断了今生、忘了曾经 提交于 2019-12-11 02:58:31
问题 If you run the following: library(RWeka) data(iris) res = J48(Species ~., data = iris) res will be a list of class J48 inheriting from Weka_tree . If you print it R> res J48 pruned tree ------------------ Petal.Width <= 0.6: setosa (50.0) Petal.Width > 0.6 | Petal.Width <= 1.7 | | Petal.Length <= 4.9: versicolor (48.0/1.0) | | Petal.Length > 4.9 | | | Petal.Width <= 1.5: virginica (3.0) | | | Petal.Width > 1.5: versicolor (3.0/1.0) | Petal.Width > 1.7: virginica (46.0/1.0) Number of Leaves :