dataspelunking / MLwR

Machine Learning with R
226 stars 419 forks source link

M5P code does not work #5

Open RaymondBalise opened 5 years ago

RaymondBalise commented 5 years ago

I am trying to replicate the output on page 216. When I run:

m.m5p <- M5P(quality ~ ., data = wine_train)

I get this mess in my log: Aug 20, 2019 9:19:10 AM com.github.fommil.netlib.BLAS WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemBLAS Aug 20, 2019 9:19:11 AM com.github.fommil.netlib.BLAS WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefBLAS Aug 20, 2019 9:19:11 AM com.github.fommil.netlib.LAPACK WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeSystemLAPACK Aug 20, 2019 9:19:11 AM com.github.fommil.netlib.LAPACK WARNING: Failed to load implementation from: com.github.fommil.netlib.NativeRefLAPACK

I found another person (on reddit) who reported the same problem (he was on Windows 10 and I am on Mac) and there were no clues on how to fix it.

Unsurprisingly, the model output does not match what is in the book. The head of the output looks like this: `` M5 pruned model tree: (using smoothed linear models)

alcohol <= 10.85 : | volatile.acidity <= 0.237 : | | fixed.acidity <= 6.85 : | | | sulphates <= 0.485 : | | | | fixed.acidity <= 6.55 : | | | | | chlorides <= 0.038 : LM1 (34/79.918%)

summary(m.m5p) gives me this:

=== Summary ===

Correlation coefficient -0.2222 Mean absolute error 124.1163 Root mean squared error 165.4731 Relative absolute error 18429.7475 % Root relative squared error 18670.7196 % Total Number of Instances 3750

I am running: macOS: 10.14.6 RWeka Version: 0.4-40 R version 3.6.1.
Java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)

Do you have any ideas on how to get the code to work?

MEP218713 commented 3 years ago

i also have the same problem...