Giter Club home page Giter Club logo

cheapml's People

Contributors

andremonaco avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

cheapml's Issues

problesm with Xy, raply and predictions

Hi Andre,
Thanks for putting up this code. I an have a few problems and I thought I would check with you before looking further into them

  1. Xy seems to have changed. It now requires something like
Xy(task = "regression")
recipe <- Xy(task = "regression" ) %>%
       add_linear(p = 2, family = xy_normal()) 
simulate(recipe)

I have not figured it out yet. I just used an older version of R with an older Xy
2) There seems to be a problem or a change with raply. Here is a small snippet showing what happens.

f<-function(){
    list(runif(10), data.frame(matrix(0,2,2)))
    }
temp <- plyr::raply(2,  f() )
> temp
     1          2     
[1,] Numeric,10 List,2
[2,] Numeric,10 List,2

This can we fixed or at least worked around by changing you code to

trees<-lapply (c(1:n_trees), f<-function(x){sprout_tree(formula = formula,  feature_frac = feature_frac, data = data )})
  1. the prediction is very poor
source("../algorithms/reg_rf.R")
mod3 <- reg_rf(formula = eq, data = model_df,n_trees=10,feature_frac=0.63)
plot(mod3$fit , model_df$y)
cor(mod3$fit, model_df$y) #0.01

I think this is because the fits coming out of sprout_tree are for the boostrapped data set and not the original data set.
I can see a fix for this but I thought I woudl check with you first in case I was missing something.

Bye

Concerning reg_tree.R

Thanks for sharing your code (reg_tree.R), this helped me save some time. If I understand your code correctly, I think below line 69 you may want to insert the following line:

y <- this_data[, as.character(formula)[2]]

Otherwise I think the sse is not calculated correctly.
Thanks.

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.