Questions tagged [superlearner]

14 questions
2
votes
2 answers

R: how to specify my own CV folds in SuperLearner

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] +…
Adrian
  • 9,229
  • 24
  • 74
  • 132
1
vote
0 answers

Check sensitivity of model performance to group-based composition of folds

I am using the caret and SuperLearner packages in R for repeated k-fold crossvalidation on a survey dataset. To keep it simple, the dataset comprises an outcome variable, and two features/predictors called feature1 and feature2. Crucially, the data…
Dr. Fabian Habersack
  • 1,111
  • 12
  • 30
0
votes
0 answers

Id of new paper or sites

How to get the source id of any newspaper for my news app like The Hindu,Times of India etc. because in my app I have only access to the the other country? So please help me so that I can complete my project and share it with my family. I just want…
0
votes
0 answers

Error with Python Collections Module in __init__.py when using ML Ensemble (mlens)

I am trying to use ML Ensemble. You can see installation details here: http://ml-ensemble.com/info/start/install.html. I would run in terminal: pip3 install sklearn pip3 install mlens pip3 install pandas pip3 install -U mlens and I have Python…
0
votes
0 answers

Why using the scipy.nnls and the sklearn.linear_models.LinearRegression produces different results? Super Learner question

I'm trying to implement my own version of a super learner in python. Here is the code: from sklearn.base import BaseEstimator, RegressorMixin from sklearn.utils.validation import check_X_y, check_array, check_is_fitted from…
0
votes
0 answers

Cross validation in SuperLearner: How to get results (R², RMSE, etc.) for each individual fold?

I am using SuperLearner for repeated V-fold or cross validation. Is there a way to obtain individual results for each of the say V=10 folds? # Packages library(tidyverse) library(SuperLearner) library(caret) # Some data X <- matrix(rnorm(1000 *…
Dr. Fabian Habersack
  • 1,111
  • 12
  • 30
0
votes
0 answers

Creating Folds for Cross Validation keeping clusters together

I am training an ML model on R to predict the probability of subjects being assigned to treatment (propensity score). I am using 5-fold CV, however my models tend to overfit the data, this is because treatment was assigned at the cluster level and…
0
votes
1 answer

SuperLearner Error in R - Object 'All' not found

I am trying to fit a model with the SuperLearner package. However, I can't even get past the stage of playing with the package to get comfortable with it.... I use the following code: superlearner<-SuperLearner::SuperLearner(Y=y,…
r-newbie
  • 11
  • 1
0
votes
1 answer

Using StandardScaler as Preprocessor in Mlens Pipeline generates Classification Warning

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…
Mark
  • 25
  • 4
0
votes
1 answer

mlr3 optimized average of ensemble

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…
ava
  • 840
  • 5
  • 19
0
votes
1 answer

Python Mlens Ensemble: KeyError: "None of [Int64Index([... dtype='int64', length=105)] are in the [columns]"

Following is a small version of code where I'm getting this error: KeyError: "None of [Int64Index([...], dtype='int64')] are in the [columns]" '...' is a series of numbers that seem to match the index of my X and y dataframes. I am using the Mlens…
Mark
  • 25
  • 4
0
votes
1 answer

R - Suggestions for Superlearner with different subsets of features in each learner?

I'm looking to combine learners each developed using different subsets of features and algorithms into a SuperLearner. I realize this is not how SuperLearning generally works, but please trust that I have my reasons. I've been creating custom…
user2230555
  • 435
  • 1
  • 3
  • 9
0
votes
1 answer

How to determine permutation variable importance from a SuperLearner model?

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…
Mark
  • 25
  • 4
-3
votes
1 answer

facing problem while running functions in the python

I am new to programming, I started to learn python, I have downloaded VS code and Pycharm IDE to run python, my normal code is running successfully but when I define any function in the code , it does not show any output(does not show any error…
deeps
  • 1
  • 2