Why some classifiers are not available in WEKA?

11,898

Solution 1

J48 is a decision tree classifier and not able to predict numeric attributes. You only have numeric attributes in your data set and therefore you can't use J48. If you have categorical attributes, more classifiers will be available.

Solution 2

The problem is that for class attribute you have numeric inputs, but j48 needs nominal inputs.

So, in weka, in preprocess tab choose filters->unsupervised->attribute->NumericToNominal

You are done!

Share:
11,898
caspik
Author by

caspik

Updated on June 07, 2022

Comments

  • caspik
    caspik almost 2 years

    I have a data set and for the dataset not every classifier is available? How to I change my dataset to get, for example, J48 works for my dataset?

    Thanks.

    @relation test
    
    @attribute SQ numeric
    @attribute DH numeric
    @attribute EEG1 numeric
    @attribute EEG2 numeric
    @attribute ECG numeric
    @attribute EM numeric
    @attribute FATIGUE numeric
    
    @data
    0.9,0.06,0.4,0.3,0.12,0.19,0.1
    0.9,0.17,0.4,0.5,0.42,0.19,0.18
    0.5,0.5,0.5,0.5,0.5,0.7,0.5
    0.5,0.5,0.45,0.45,0.42,0.56,0.39
    0.01,1,1,0.99,1,1,1
    0.7,0.17,0.3,0.4,0.28,0.69,0.24
    0.8,0.28,0.5,0.4,0.44,0.19,0.24
    0.88,0.17,0.45,0.4,0.42,0.7,0.26
    0.1,0.83,0.9,0.89,1,0.75,0.884
    0.15,0.96,0.75,0.8,0.92,0.75,0.884
    0.23,0.83,0.75,0.78,0.75,0.74,0.83
    0.19,0.86,0.7,0.75,0.73,0.89,0.83
    0.1,0.63,0.7,0.7,0.71,0.74,0.756
    0.34,0.68,0.8,0.75,0.72,0.73,0.756
    0.08,0.92,0.98,0.98,0.82,1,0.926
    0.1,0.93,0.93,0.95,1,1,0.926
    0.065,0.92,0.95,0.95,0.75,1,0.926