GithubHelp home page GithubHelp logo

estatcamp / mlr3extralearners Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlr-org/mlr3extralearners

0.0 1.0 0.0 50.93 MB

Extra learners for use in mlr3.

Home Page: https://mlr3extralearners.mlr-org.com/

R 100.00%

mlr3extralearners's Introduction

mlr3extralearners

Package website: release | dev

Extra Learners for mlr3.

R CMD Check codecov StackOverflow CodeFactor

What is mlr3extralearners?

mlr3extralearners contains all learners from mlr3 that are not in mlr3learners or the core packages. mlr3extralearners contains helper functions to find where all the learners, across the mlr3verse, live and to install required packages to run these learners. See the interactive learner list for the full list of learners in the mlr3verse and the learner status page for a live build status.

list_mlr3learners(select = c("id", "mlr3_package", "required_packages"))
#>                      id      mlr3_package      required_packages
#>   1: classif.AdaBoostM1 mlr3extralearners                  RWeka
#>   2:       classif.bart mlr3extralearners                 dbarts
#>   3:        classif.C50 mlr3extralearners                    C50
#>   4:    classif.cforest mlr3extralearners partykit,sandwich,coin
#>   5:      classif.ctree mlr3extralearners partykit,sandwich,coin
#>  ---                                                            
#> 126:        surv.ranger      mlr3learners                 ranger
#> 127:         surv.rfsrc mlr3extralearners randomForestSRC,pracma
#> 128:         surv.rpart         mlr3proba  rpart,distr6,survival
#> 129:           surv.svm mlr3extralearners            survivalsvm
#> 130:       surv.xgboost      mlr3learners                xgboost

mlr3extralearners lives on GitHub and will not be on CRAN. Install with:

remotes::install_github("mlr-org/mlr3extralearners")

Installing and Loading Learners

The package includes functionality for detecting if you have the required packages installed to use a learner, and ships with the function install_learner which can install all required learner dependencies.

lrn("regr.gbm")
#> Error: Required packages not installed, please run `install_learners("regr.gbm")`.
install_learners("regr.gbm")
lrn("regr.gbm")
#> <LearnerRegrGBM:regr.gbm>
#> * Model: -
#> * Parameters: keep.data=FALSE, n.cores=1
#> * Packages: gbm
#> * Predict Type: response
#> * Feature types: integer, numeric, factor, ordered
#> * Properties: importance, missings, weights

Extending mlr3extralearners

New learners can be created with the create_learner function. This assumes you have a local copy of mlr3extralearners. This function will automatically create the learner, learner tests, parameter tests, YAML files for CI if required, and update the DESCRIPTION if required. Once all tests are passing locally, open a pull request with the “New Learner” template.

create_learner(classname = "Locfit",
               algorithm = "localised fit",
               type = "dens",
               key = "locfit",
               package = "locfit",
               caller = "density.lf",
               feature_types = c("integer", "numeric"),
               predict_types = c("pdf", "cdf"),
               properties = NULL,
               importance = FALSE,
               oob_error = FALSE,
               references = FALSE,
               gh_name = "RaphaelS1")

mlr3extralearners's People

Contributors

actions-user avatar salauer avatar web-flow avatar mllg avatar

Watchers

James Cloos avatar

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.