SuperLearner | Current version of the SuperLearner R package | Machine Learning library

 by   ecpolley R Version: Current License: No License

kandi X-RAY | SuperLearner Summary

kandi X-RAY | SuperLearner Summary

SuperLearner is a R library typically used in Artificial Intelligence, Machine Learning applications. SuperLearner has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

This is the current version of the SuperLearner R package (version 2.*).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              SuperLearner has a low active ecosystem.
              It has 216 star(s) with 61 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 55 have been closed. On average issues are closed in 88 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of SuperLearner is current.

            kandi-Quality Quality

              SuperLearner has 0 bugs and 0 code smells.

            kandi-Security Security

              SuperLearner has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              SuperLearner code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              SuperLearner does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              SuperLearner releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SuperLearner
            Get all kandi verified functions for this library.

            SuperLearner Key Features

            No Key Features are available at this moment for SuperLearner.

            SuperLearner Examples and Code Snippets

            No Code Snippets are available at this moment for SuperLearner.

            Community Discussions

            QUESTION

            How to specify a particular optimization method in glm
            Asked 2021-Aug-15 at 18:54

            In the documentation for glm, there is a method option where in the documentation it says that

            User-supplied fitting functions can be supplied either as a function or a character string naming a function, with a function which takes the same arguments as glm.fit. If specified as a character string it is looked up from within the stats namespace.

            I would like to use a binomial non-negative least squares optimizer so that the coefficients are non-negative and sum up to 1. An example of this optimizer being used is in the SuperLearner package with the option method = "method.NNLS". Below is a reproducible example:

            ...

            ANSWER

            Answered 2021-Aug-15 at 18:54

            A way (not the only way, possibly not the most efficient or most compact) to solve this problem is to do general maximum-likelihood estimation on parameters in a transformed space; probably the most common such transformation is the additive log ratio transformation (e.g. as in compositions::alr()). This solution uses the bbmle package, which is a wrapper around optim(); in this case, it doesn't actually offer that much advantage over directly using optim()

            Source https://stackoverflow.com/questions/68793266

            QUESTION

            mlr3 optimized average of ensemble
            Asked 2021-Apr-20 at 10:07

            I try to optimize the averaged prediction of two logistic regressions in a classification task using a superlearner.

            My measure of interest is classif.auc

            The mlr3 help file tells me (?mlr_learners_avg)

            Predictions are averaged using weights (in order of appearance in the data) which are optimized using nonlinear optimization from the package "nloptr" for a measure provided in measure (defaults to classif.acc for LearnerClassifAvg and regr.mse for LearnerRegrAvg). Learned weights can be obtained from $model. Using non-linear optimization is implemented in the SuperLearner R package. For a more detailed analysis the reader is referred to LeDell (2015).

            I have two questions regarding this information:

            1. When I look at the source code I think LearnerClassifAvg$new() defaults to "classif.ce", is that true? I think I could set it to classif.auc with param_set$values <- list(measure="classif.auc",optimizer="nloptr",log_level="warn")

            2. The help file refers to the SuperLearner package and LeDell 2015. As I understand it correctly, the proposed "AUC-Maximizing Ensembles through Metalearning" solution from the paper above is, however, not impelemented in mlr3? Or do I miss something? Could this solution be applied in mlr3? In the mlr3 book I found a paragraph regarding calling an external optimization function, would that be possible for SuperLearner?

            ...

            ANSWER

            Answered 2021-Apr-20 at 10:07

            As far as I understand it, LeDell2015 proposes and evaluate a general strategy that optimizes AUC as a black-box function by learning optimal weights. They do not really propose a best strategy or any concrete defaults so I looked into the defaults of the SuperLearner package's AUC optimization strategy.

            Assuming I understood the paper correctly:

            The LearnerClassifAvg basically implements what is proposed in LeDell2015 namely, it optimizes the weights for any metric using non-linear optimization. LeDell2015 focus on the special case of optimizing AUC. As you rightly pointed out, by setting the measure to "classif.auc" you get a meta-learner that optimizes AUC. The default with respect to which optimization routine is used deviates between mlr3pipelines and the SuperLearner package, where we use NLOPT_LN_COBYLA and SuperLearner ... uses the Nelder-Mead method via the optim function to minimize rank loss (from the documentation).

            So in order to get exactly the same behaviour, you would need to implement a Nelder-Mead bbotk::Optimizer similar to here that simply wraps stats::optim with method Nelder-Mead and carefully compare settings and stopping criteria. I am fairly confident that NLOPT_LN_COBYLA delivers somewhat comparable results, LeDell2015 has a comparison of the different optimizers for further reference.

            Thanks for spotting the error in the documentation. I agree, that the description is a little unclear and I will try to improve this!

            Source https://stackoverflow.com/questions/66926354

            QUESTION

            Using StandardScaler as Preprocessor in Mlens Pipeline generates Classification Warning
            Asked 2021-Apr-06 at 21:50

            I am trying to scale my data within the crossvalidation folds of a MLENs Superlearner pipeline. When I use StandardScaler in the pipeline (as demonstrated below), I receive the following warning:

            /miniconda3/envs/r_env/lib/python3.7/site-packages/mlens/parallel/_base_functions.py:226: MetricWarning: [pipeline-1.mlpclassifier.0.2] Could not score pipeline-1.mlpclassifier. Details: ValueError("Classification metrics can't handle a mix of binary and continuous-multioutput targets") (name, inst_name, exc), MetricWarning)

            Of note, when I omit the StandardScaler() the warning disappears, but the data is not scaled.

            ...

            ANSWER

            Answered 2021-Apr-06 at 21:50

            You are currently passing your preprocessing steps as two separate arguments when calling the add method. You can instead combine them as follows:

            Source https://stackoverflow.com/questions/66959756

            QUESTION

            How to determine permutation variable importance from a SuperLearner model?
            Asked 2020-Sep-04 at 19:51

            My overall goal is to determine variable importance from a Superlearner as performed on the Boston dataset. However, when I attempt to determine the variable importance using the VIP package in R, I receive the error below. My suspicion is that the prediction wrapper containing the SuperLeaner object is the cause of the error, but I am by no means sure.

            ...

            ANSWER

            Answered 2020-Sep-04 at 19:51

            For the SuperLearner object, you can see it returns a list of probabilities

            Source https://stackoverflow.com/questions/63725192

            QUESTION

            R: how to specify my own CV folds in SuperLearner
            Asked 2020-Jul-01 at 18:26
            library(SuperLearner)
            library(MASS)
            set.seed(23432)
            ## training set
            n <- 500
            p <- 50
            X <- matrix(rnorm(n*p), nrow = n, ncol = p)
            colnames(X) <- paste("X", 1:p, sep="")
            X <- data.frame(X)
            Y <- X[, 1] + sqrt(abs(X[, 2] * X[, 3])) + X[, 2] - X[, 3] + rnorm(n)
            
            
            sl_cv = SuperLearner(Y = Y, X = X, family = gaussian(),
                              SL.library = c("SL.mean", "SL.ranger"),
                              verbose = TRUE, cvControl = list(V = 5))
            
            ...

            ANSWER

            Answered 2020-Jul-01 at 11:15

            There are some control parameters for the cross-validation procedure. You could use the validRows parameter. You will need a list with 5 elements, each element having a vector of all rows that correspond to the clusters you have predefined. Assuming you added a column that shows which cluster an observation belongs to, you could write something like:

            Source https://stackoverflow.com/questions/62527215

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install SuperLearner

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ecpolley/SuperLearner.git

          • CLI

            gh repo clone ecpolley/SuperLearner

          • sshUrl

            git@github.com:ecpolley/SuperLearner.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link