Questions tagged [elasticnet]

8 questions
1
vote
1 answer

Gekko solutions not found while trying to implement an elastic net regression

I am presently trying to build a elastic net regression model by using Gekko. I'm using Gekko instead of sklearn etc. because I'd also need to implement additional constraints on my variable coefficients. And the Gekko code works if I omit the…
1
vote
0 answers

the goodness of fit to the elasticnet model looks bad

import os import pandas as pd from sklearn.linear_model import ElasticNet from sklearn.model_selection import train_test_split, GridSearchCV, cross_validate from sklearn.metrics import mean_squared_error, r2_score import numpy as np # Set the…
Toiba
  • 11
  • 2
1
vote
1 answer

SKLearn & ElasticNet: Cross validation fails when using Accuracy as a metric

I have a binary classification problem. I've been using cross validation to optimize the ElasticNet parameters. However ElasticNet only seems to work when I supply roc_auc as the scoring method to be used during CV, However I also want to test out a…
pd441
  • 2,644
  • 9
  • 30
  • 41
0
votes
0 answers

rank features after feature selected in the selected elastic net models using glmnet package

I have a question related to ranking of features after modeling step. I had total 1204 features in original predictor file. After doing elastic net modeling(using cv.glment package), out of 1204 128 features got selected. I want to see the ranking…
rheabedi1
  • 65
  • 7
0
votes
0 answers

How to use bootstapping for features selection

I want to design a model to predict gestational age based on the paper. In this process, one way to increase accuracy is feature selection. There are many ways, but I have not obtained the selected features like paper. Also, I could not understand…
0
votes
1 answer

How to set penalty of elastic net in Logistic Regression

I was currently working on one of the assignments from the IBM Machine learning course. I ended up getting one error multiple times while training the model even when I set penalty = 'elasticnet'. I know that the elastic net model needs an L1 ratio…
0
votes
1 answer

How to systematically replicate the results of running n LASSOs on n data sets in R using enet() with lars()

My code used to fit k LASSO Regressions on k csv file-formatted data sets via the enet() function from the following: set.seed(150) system.time(LASSO <- lapply(datasets, function(J) elasticnet::enet(x = as.matrix(dplyr::select(J, …
0
votes
0 answers

Why is my ElasticNet model predicts always 0?

I know it's a debatable question but I'll try since I am struggling a lot around this. I have a database made like this (I print only the head and the first column is the y variable which has way more zeroes than ones in a proportion of almost 85%…
Lusian
  • 629
  • 1
  • 5
  • 11