Questions tagged [regularization]

Inclusion of additional constraints (typically a penalty for complexity) in the model fitting process. Used to prevent overfitting / enhance predictive accuracy.

Filter by
Sorted by
Tagged with
2
votes
3answers
56 views

Can ridge regression be used for feature selection?

I'm trying to figure out whether using Ridge Regression for regularization can be used to cause a more sparse hypothesis however to me it seems like ridge will never actually bring any coefficients to ...
2
votes
1answer
15 views

Quadratic approximation of L1 regularized cost function

I'm reading the Deep Learning book of Goodfellow, but I fail to see why minimization of (7.22) gives (7.23). I tried to compute the gradient w.r.t. the $w_{i}$ and set this to zero, but it doesn't ...
1
vote
0answers
9 views

High Variance on CNN

I'm using a shallow CNN for my current project [this one]. I have a training dataset consisting of 1000 samples and a test dataset of 400 samples. I'm using the test dataset to choose the best ...
1
vote
1answer
16 views

Why do we determine the values of λ in regularization as ln λ, such as ln λ=-18 instead of for example λ=0.3?

I'm studying Pattern Recognition and Machine Learning by Christopher Bishop. What I realized is, he defines values of λ as ln λ. For example: We see that, for a value of lnλ = −18, the over-fitting ...
1
vote
1answer
19 views

Why do we divide the regularization term by the number of examples in regularized logistic regression?

So this is the formula for the regularized logistic regression cost function: $x^{(i)}$ - the $i$'th training example $\theta_j$ - the parameter of the $j$'th feature $m$ - the number of training ...
3
votes
2answers
126 views

Why use regularization instead of decreasing the model

Regularization is used to decrease the capacity of a machine learning model to avoid overfitting. Why don't we just use a model with less capacity (e.g. decrease the number of layers). This would also ...
4
votes
2answers
73 views

L1 & L2 Regularization in Light GBM

This question pertains to L1 & L2 regularization parameters in Light GBM. As per official documentation: reg_alpha (float, optional (default=0.)) – L1 ...
1
vote
1answer
35 views

Light GBM Regressor, L1 & L2 Regularization and Feature Importances

I want to know how L1 & L2 regularization works in Light GBM and how to interpret the feature importances. Scenario is: I used LGBM Regressor with RandomizedSearchCV (cv=3, iterations=50) on a ...
4
votes
2answers
53 views

Why does Lasso behave “erratically” when the number of features is greater than the number of training instances?

From the book "Hands-on Machine Learning with Scikit-Learn and TensorFlow 2nd edition" chapter 4: In general, Elastic Net is preferred over Lasso since Lasso may behave erratically when the ...
1
vote
1answer
31 views

Improving Accuracy of the Deep Learning Model

In my current project, I have only 647 rows (500 for training and 147 for testing) and I have applied the Keras Sequential model using the following code: ...
1
vote
0answers
27 views

Version of Perceptron

If we change the $ywx<0$ condition (for performing update) to $ywx<1$ like in SVM (but without adding regularization to maximize the margin), is there any difference from the basic perceptron (...
1
vote
1answer
19 views

Why non-differentiable regularization lead to setting coefficients to 0?

The L2 regularization lead to minimize the values in the vector parameter. The L1 regularization lead to setting some coefficients to 0 in the vector parameter. More generally, I've seen that non-...
0
votes
0answers
17 views

Regularization loss - Why is that important to get unique weights solution

There's something that is bothering me in Regularization. There is one bug with the loss function when I just use for e.g. a multi-class SVM loss. Suppose that we have a dataset and a set of ...
1
vote
2answers
45 views

Difference between LASSO penalty in neural network and just LASSO regression

I wonder whether those two have any significant differences. I think in neural network, the lasso penalty put on the loss function makes the model simpler and introduces more sparsity by ...
3
votes
2answers
46 views

SVM behavior when regularization parameter equals 0

I read on this Wikipedia page the following about soft-margin SVM: "The parameter $λ$ determines the trade-off between increasing the margin size and ensuring that the $x_i$ lie on the correct ...
2
votes
1answer
32 views

Multiclass classification with high number of classes, high number of features and small sample size

I am working on a biology related dataset with over 300K features, and I only have about 5K samples. I want my model to classify many classes. For this problem in particular the class is age. Each age ...
1
vote
1answer
37 views

correct ML approach

I wanted to get your thoughts on a problem I have been facing. I have daily level product sales information (about 4 years). The sales are affected by the typical factors such as seasonality, day of ...
0
votes
0answers
16 views

what is the relationship between Penalties and Regularization?

i am learning the DeepLearningBook, in which chapter7 talks a lot about Penalties and Regularization. i would like to figure out the relationship between Penalties and Regularization. it seems that ...
0
votes
0answers
14 views

What's the correct way of implementation of cost function and gradient function in logistical regression after regularisation?

This is the cost function of logistic regression: which i could implement correctly, with the code : ...
1
vote
3answers
97 views

What is the point of getting rid of overfitting?

I'm having trouble understanding why I would use dropout, regularization, data augmentation, etc to get rid of overfitting in the first place. I get that if your model is too large or data is too ...
0
votes
0answers
143 views
2
votes
1answer
85 views

Square Root Regularization and High Loss

I am testing out square root regularization (explained ahead) in a pytorch implementation of a neural network. Square root regularization, henceforth l1/2, is just like l2 regularization, but instead ...
0
votes
0answers
53 views

Running into strange errors when using glmnet and generating graphs

I developed a very simple Ridge Regression with glmnet, the R package. When I use the plot.glmnet() function I encounter strange errors: ...
1
vote
1answer
32 views

neural networks error function: is global minimum desirable?

In "Elements of statistical learning" page 395 the authors state that, relative to R(θ), the regression/classification error function in a neural network such as a multi layer perceptron: Typically ...
0
votes
1answer
28 views

Regularization: global or layerwise?

Keras gives you the option to apply regularization differently to different layers. I mean, why not? Though when I first learned about neural nets (from ESL), I thought of it as a global parameter. ...
1
vote
1answer
52 views

Importing Excel format data into R/R Studio and using glmnet package?

I have no problem importing Excel formatted data into R/R Studio and use all other R packages that I use. But, when I want to use the glmnet package to develop a regularization model, I invariably ...
1
vote
0answers
96 views

Keras regularizers (kernel, bias and activity) vs tf.contrib.layers.apply_regularization

I have a DCGAN set up in tensorflow that is working well on the faces in the wild dataset. As an experiment, I tried using the same architecture in keras to better understand the difference in ...
2
votes
1answer
17 views

R package clogitL1 no longer available? [closed]

When I try to install clogitL1 on my work server I get ...
0
votes
0answers
18 views

Why do we reduce magnitude of the coefficient in regression

Why do we reduce the magnitude of the coefficient in regression? how does it help the model?
1
vote
1answer
20 views

Make embedding more Gaussian-like

I am trying to train a neural network to find a mapping(embedding) to a lower dimensional space. I would like for my dataset, once mapped to the lower dimensional space, to appear gaussian-like ...
1
vote
1answer
34 views

Loss and Regularization inference

I'm building a Matrix Factorization model for MovieLens dataset with batch-wise training. Loss function for the batch: $$ L_{batch} = 1/|B|\sum_{(u,i)\in{B}}(r_{ui} - \mu - b_u - b_i - p_u^Tq_i)^2 + \...
2
votes
0answers
199 views

Regularization in Embedding models?

What is the best way to regularize latent embeddings, I have two solution in my mind but I'm not sure which one to use over other. In batch-wise training regularize over the whole embedding matrix, ...
0
votes
0answers
44 views

Matrix Factorization for Recommender Systems

Referring to the paper Matrix Factorization Techniques for Recommender Systems, Loss function for Matrix Factorization using bias terms is given as: $$ \min_{p, q, b}\sum_{(u,i)\in\kappa}(r_{ui} - \mu ...
0
votes
1answer
135 views

How does a Bayes regularization works?

I'm trying to get grasp of Bayes regularization algorithm. List of symbols 1st: $F$ - objective function $\gamma$ - regularization parameter $M$ - number od neural network weights $N$ - number of data ...
2
votes
0answers
87 views

Regularization term in Matrix Factorization

I'm trying to build a naive recommender system using latent factor model for MovieLens dataset. From the observed set of ratings I'm trying to build a model which will decompose the sparse matrix to N ...
0
votes
1answer
18 views

What affects the magnitude of lasso penalty of a feature?

Is there a way to intuitively tell if the lasso penalty for a particular feature will be small or large? Consider the following scenario: Imagine we use Lasso regression on a dataset of 100 features ...
3
votes
1answer
730 views

Which regularization in convolution layers (conv2D) [closed]

I am using Keras for a project. I would like to know if it makes any sense to add any kind of regularization components such as kernel, bias or activity regularization in convolutional layers i.e <...
3
votes
1answer
830 views

Regularization in simple math explained

I read a lot of articles online about how regularization works and most of them just show the equations with regularization terms but did not use example numbers to explain how the coefficient values ...
3
votes
1answer
196 views

Implemented early stopping but came across the error SGDClassifier: Not fitted error in sklearn

Below is the simpler implementation of early stopping which i came across the book and wanted to try it. ...
2
votes
1answer
53 views

Does Orange scale the data automatically for the linear regression with Ridge regularization

I'm using the linear regression tool with the Ridge regularization. To use the Ridge regularization, I have to scale the data first. Does Orange scale the data automatically? I can't find any ...
2
votes
0answers
248 views

Is regularization only for regression?

I am making a classification model. I understand that the regularization minimizes loss functions. Can i use regularization techniques to minimize loss function in classification if doing so is ...
3
votes
1answer
6k views

When should one use L1, L2 regularization instead of dropout layer, given that both serve same purpose of reducing overfitting?

In Keras, there are 2 methods to reduce over-fitting. L1,L2 regularization or dropout layer. https://keras.io/regularizers/ https://keras.io/layers/core/#dropout What are some situations to use L1,...
0
votes
1answer
634 views

Should highly correlated features be omitted before applying Lasso?

I would greatly appreciate if you could let me know whether I should omit highly correlated features before using Lasso logistic regression (L1) to do feature ...
12
votes
4answers
3k views

Why does adding a dropout layer in Keras improve machine learning performance, given that dropout suppresses some neurons from the model?

If removing some neurons results in a better performing model, why not use a simpler neural network with fewer layers and fewer neurons in the first place? Why build a bigger, more complicated model ...
2
votes
1answer
879 views

Is regularization included in loss history Keras returns?

I'm getting to know Keras. Right now, I'm testing with regularization and how to use them. Comparing the results of loss history for a training session with and without regularization, it seems to me ...
2
votes
0answers
59 views

Problems with Graphical Lasso

I'm trying to use the Graphical Lasso algorithm (more specifically the R package glasso) to find an estimated graph representing the connections between a set of nodes by estimating a precision matrix....
1
vote
0answers
26 views

Why should each layer's child network output be close to parent network's output for variance regularizer?

I am reading up on PEA (Pseudo ensemble agreement) regularizer. specificaly in the neural networks domain. It introduces the concept of perturbing the model a little and forcing the model to make ...
2
votes
1answer
190 views

Why don't we want Autoencoders to perfectly represent their training data?

From Ian Goodfellow's Deep Learning Book: If an autoencoder succeeds in simply learning to set g(f(x)) = x everywhere, then it is not especially useful. Instead, ...
1
vote
1answer
55 views

What is the intuition behind Ridge Regression and Adapting Gradient Descent algorithms?

So I was going through Adaptive Gradient Descent, and learning the intuition behind it: optimizing the learning algorithm, and getting the model to converge faster. The way AdaGrad does this, is by ...
1
vote
1answer
91 views

Loss for CNN decreases and settles but training accuracy does not improve

I am training a CNN with 2 conv layers 2 Relu and max pooling and 2 FC layers the last of which has only 2 units since it's a binary classification problem. The images are spatio-temporal continuous, ...