Coder Social home page Coder Social logo

mlwr's People

Contributors

dataspelunking avatar edent avatar lantzb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mlwr's Issues

Unicode / Mojibake errors in CSV

For example on https://github.com/dataspelunking/MLwR/blob/master/Machine%20Learning%20with%20R%20(2nd%20Ed.)/Chapter%2004/sms_spam.csv#L79

Allo! We have braved the buses and taken on the trains and triumphed. I mean we€˜re in b€˜ham. Have a jolly good rest of week

Should be

Allo! We have braved the buses and taken on the trains and triumphed. I mean we're in b'ham. Have a jolly good rest of week

There's a few issues like this. Would you accept a PR to fix them?

train function from chapter 11 does not work

With R 3.5.3 running caret 6.0-84. The chunk of code below (around line 61 on GITHUB)

library(ipred)
library(caret)

set.seed(300)

ctrl <- trainControl(method = "cv", number = 10)

bagctrl <- bagControl(fit = svmBag$fit,
                      predict = svmBag$pred,
                      aggregate = svmBag$aggregate)

svmbag <- train(default ~ ., data = credit, "bag",
                trControl = ctrl, bagControl = bagctrl)

throws this warning 10 times:

10: model fit failed for Fold10: vars=35 Error in fitter(btSamples[[iter]], x = x, y = y, ctrl = bagControl, v = vars,  : 
  task 1 failed - "no applicable method for 'predict' applied to an object of class "c('ksvm', 'vm')""

Then this

11: In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  ... :
  There were missing values in resampled performance measures.

Help....

M5P code does not work

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.