0
I次のコードを持っている:J48から私のためにベイジアンネットワーク図をプロットすることになっているweka.core.UnsupportedAttributeTypeException:weka.classifiers.trees.j48.C45PruneableClassifierTree:文字列を扱うことができない属性
#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 <- J48(region~., data = cleaned_rest_countries)
plot(m)
アルゴリズム。
> m <- J48(region~., data = cleaned_rest_countries)
Error in .jcall(o, "Ljava/lang/Class;", "getClass") :
weka.core.UnsupportedAttributeTypeException: weka.classifiers.trees.j48.C45PruneableClassifierTree: Cannot handle string attributes!
問題の解決を支援してください:私は次のエラーを取得する方法は、これまで 。 CSVからデータを読み込むとうまくいきますが、jsonから文字列属性エラーが発生します。
可能な重複[ウェカJ48分類器:?数値クラスを扱うことができない](http://stackoverflow.com/questions/7932888/weka-j48-classifier-cannot-handle-numeric-class) – sebastianmm