Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [mse]

MSE stands for mean-squared error. It's a measurement of an empirical loss in certain mathematical models, especially regression models.

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

Averaging model performance across n-fold cross validation: MSE or R^2?

I'm comparing the performance of several models on the same data using cross-validation (holding out 1/n of the data as a test set, fitting the model on the remaining data, testing on the test set). I ...
Leo Selker's user avatar
0 votes
0 answers
22 views

Sample Size for Adaptive Lasso

Be gentle, I'm learning here. I have a fairly simple adaptive lasso regression that I'm trying to test for a minimum sample size. I used cross-validated mean squared error as the "score" of ...
JRDubbleu's user avatar
0 votes
0 answers
15 views

Meaning of mean squared error in multistep prediction

In multistep prediction with LSTM(keras), say we had this kind of result: target = [[1,2,3] ,[4,5,6] ] predictions = [[1.1,2.2,3.3] , [4.4,5.5,6.6]] When we choose mean_squared_error as the loss ...
the_he_man's user avatar
0 votes
0 answers
29 views

Proper metric for measuring the similarity between two images

I want to calculate the similarity between these two images: and These are brain topography maps and colors inside the circles represent the area being activated while watching TV. Thus I am looking ...
tail's user avatar
  • 117
0 votes
0 answers
20 views

How to lower MSE using polynomial regression?

I have a training dataset with the positions (x and y) of three objects and their velocities at a time t. Then I have a test dataset with the initial positions and a time step x. The goal is to ...
iknownas's user avatar
0 votes
0 answers
27 views

what's the difference between using 1/2n and 1/n in cost function in Linear Regression? [duplicate]

Sometimes people use 1/2n in cost function, but we know that another name for cost function is Mean Squared Error. But for MSE, 1/n is justifiable than 1/2n, so is there any term that we call when we ...
Sid's user avatar
  • 1
0 votes
0 answers
25 views

How do you appropriately measure the real mean squared error of a box cox transformed linear regression model?

My understanding is that it can make sense to transform the outcomes of a linear regression model to make them more normally distributed. That's because it could 1) help me find more linear ...
Gwater17's user avatar
  • 101
1 vote
1 answer
631 views

Why COST FUNCTION AND MSE IS CALLED THE SAME?

Why are the cost function and mean squared errors called the same thing? WHEN THE COST FUNCTION IS 1/2M AND THE MSE IS 1/N. AND M=N
Rubayet Alam's user avatar
0 votes
1 answer
54 views

How to select the validation loss value in this model to be compared with other models?

I'm training an LSTM model. I'm confusing about the validation loss of the model. Which value better represents the validation loss of the model? Is it the last value I obtain in the floowing loop, or ...
Mouna Ahmen's user avatar
1 vote
0 answers
195 views

ValueError: Found input variables with inconsistent numbers of samples: [120, 30]

I practice XGBClassifier() to predict the target in iris dataset. here is the code: ...
BADREDDINE BALAJ's user avatar
0 votes
0 answers
43 views

Hello! I am create linear model in python, and have question. It's bad score or good score?

please, take me info, this bad or good? I am real don't understand.... i'm know, also when Mean Absolute Deviation (MAD): In [0,∞), the smaller the better Root Mean Squared Error (RMSE): In [0,∞), the ...
Iakov Andreev's user avatar
0 votes
1 answer
53 views

Relation between MSE and variance of data

I am having a hard time understanding how to compare results of MSE and variance of data to eachother. I understand that MSE is used to calculate how far off data points are from a prediction, say you ...
Kodak's user avatar
  • 1
2 votes
1 answer
2k views

Predict actual result after model trained with MinMaxScaler LinearRegression

I was doing the modeling on the House Pricing dataset. My target is to get the mse result and predict with the input variable I have done the modeling, I'm doing the modeling with scaling the data ...
MADFROST's user avatar
  • 123
0 votes
3 answers
156 views

Proof for MSE = Var + Bias2

I am trying to prove the equality of $$\rm MSE=Var+Bias^2$$ but obviously I got something wrong as they don't equal in my calculation: So here is the example. I use monte carlo to estimate this ...
ali's user avatar
  • 133
0 votes
1 answer
212 views

MAE vs MSE for linear regression

Several articles says that MAE is robust to outliers but MSE is not and MSE can hamper the model if errors are too huge. My question is that MSE and MAE both are error matrices,our priority is to just ...
Parth Sharma's user avatar
0 votes
1 answer
19 views

Do I need to rescale input labels before training (label values between 20..51)?

I'm trying to build model for this datatset (Age prediction): The input image has the shape: 3, 128, 128 and the predicted labels (ages) range between 20 to 51. I ...
user3668129's user avatar
1 vote
1 answer
2k views

how to calculate loss function?

i hope you are doing well , i want to ask a question regarding loss function in a neural network i know that the loss function is calculated for each data point in the training set , and then the ...
imene's user avatar
  • 23
0 votes
1 answer
147 views

Why does log-transforming the target have a huge impact on MSE value?

I am doing linear regression using the Boston Housing data set, and the effect of applying $\log(y)$ has a huge impact on the MSE. Failing to do it gives MSE=34.94 ...
Caterina's user avatar
  • 119
0 votes
1 answer
376 views

What causes explosion in MSE when training?

I (probably) well overfitted/overtrained a model. But I was just curious as to what might cause this type of behaviour. I carried on training (Epoch 1/50 is not the first epoch of training this model)....
Socorro's user avatar
  • 111
0 votes
1 answer
28 views

How to extract MSEP or RMSEP from lassoCV?

I'm doing lasso and ridge regression in R with the package chemometrics. With ridgeCV it is easy to extract the SEP and MSEP values by ...
Sally's user avatar
  • 5
1 vote
1 answer
87 views

Can't understand an MSE loss function in a paper

I'm reading a paper published in nips 2021. There's a part in it that is confusing: This loss term is the mean squared error of the normalized feature vectors and can be written as what follows: ...
Marzi Heidari's user avatar
0 votes
0 answers
51 views

Find $a, b, c$ minimizing MSE

Suppose you are given a "dummy" classifier. It looks like this: $$ y(x) = \begin{cases} a \text{ if } x >= c \\ b \text{ else } \end{cases} $$ Given some data set $\{(y_1, x_1), \dots (...
nutcracker's user avatar
0 votes
0 answers
114 views

Why the error between the measured data and model data is not minimizing in Python?

I want to fit the non-linear experimental data with the model function by estimating some parameters in the function. The model function I have is: ...
N_T's user avatar
  • 1
7 votes
1 answer
1k views

Why autoencoders use binary_crossentropy loss and not mean squared error?

Keras autoencoders examples: (https://blog.keras.io/building-autoencoders-in-keras.html) use binary_crossentropy (BCE) as loss function. Why they use ...
user3668129's user avatar
0 votes
0 answers
2k views

Why training loss is decreasing down too fast?

I have a dataset of video sequences, I have trained them, and calculated the training loss using mean square error, but my training loss is decreasing down very fast. Like 0.06-0.02. Is it just fine ...
TariqS's user avatar
  • 21
1 vote
3 answers
356 views

what n represents in the MSE loss function?

Neural Network Loss Function - Mean Square Error: questions about what 'n' signifies I can't understand how the answers in this question answered the question. please help me to understand the ...
EB97's user avatar
  • 11
2 votes
1 answer
153 views

What is bad, good and excellent metric score for time series model?

I have created a couple of models for my master project and I used several metrics for evaluation. I used MSE, MAE, MAPE, RMSE not because I really learned about them a lot, because I saw in many ...
Vasilii Naumushkin's user avatar
0 votes
1 answer
7k views

neg_mean_squared_error in cross_val_score [closed]

The string "mean_squared_error" appears to be deprecated in cross_val_score now, and it's saying to use ...
roulette01's user avatar
1 vote
1 answer
2k views

input shape of keras Sequential model

i am new to neural networks using keras, i have the following train samples input shape (150528, 1235) and output shape is (154457, 1235) where 1235 is the training examples, how to put the input ...
ammar's user avatar
  • 23
0 votes
3 answers
720 views

MSE relevance as a metric when errors < 1

I'm trying to build my first models for regression after taking MOOCs on deep learning. I'm currently working on a dataset whose labels are between 0 and 2. Again, this is a regression task, not ...
Gwalchaved's user avatar
3 votes
1 answer
3k views

Match between objective function and evaluation metric

Does the objective function for model fitting and the evaluation metric for model validation need to be identical throughout the hyperparameter search process? For example, can a XGBoost model be ...
thereandhere1's user avatar
0 votes
2 answers
731 views

Regression performance with Feature Selection

I would like to ask you a theoretical question. In my project I am trying to get a better performance from my regression model by feature selection methods, especially with CatBoost feature ...
Ali Kılınç's user avatar
1 vote
1 answer
2k views

What would be the mse (mean squared error) of my scaled dataset on the original scale?

I build an LSTM model on a standardized dataset using sklearn's MinMaxScaler. All values of the dataset are between 0 and 1. Features and target variables were standardized between 0 and 1. I achieve ...
eetiaro's user avatar
  • 113
0 votes
1 answer
115 views

When optimizing the MSE, the correlation between prediction and target increases?

After optimizing the MSE (mean squared error) in a regression task, how is the change in Pearson correlation coeficient between target vector and the prediction? Is any behaviour possible? Or is sure ...
Juan Esteban de la Calle's user avatar
0 votes
1 answer
105 views

I am getting very minimal mse values and not sure if it is correct?

Below is the linear regression model I fitted and not sure if I am doing the right way as I am getting neat to 99% accuracy Fitting Simple Linear Regression to the Training set ...
yathislax's user avatar
1 vote
2 answers
136 views

Finding a vector that minimize the MSE of its linear combination

I have been doing a COVID-19 related project. Here is the question: N = vector of daily new infected cases D = vector of daily deaths E[D] = estimation of daily deaths N is a n-dimensional vector, n ...
Jiaming Na's user avatar
0 votes
1 answer
193 views

PyTorch MultiLayer Perceptron Classification Size of Features vs Labels Wrong

I am getting the following error: ...
user91925's user avatar
4 votes
2 answers
2k views

Extremely high MSE/MAE for Ridge Regression(sklearn) when the label is directly calculated from the features

Edit: Removing TransformedTargetRegressor and adding more info as requested. Edit2: There were 18K rows where the relation did not hold. I'm sorry :(. After ...
RAbraham's user avatar
  • 187
-1 votes
1 answer
71 views

Understanding MSE,R2 scores wrt different scaling methods and non intutive results

EDIT: Added Code and updated the metric values as my code changed If I have the Income Statements of all the companies currently trading in the US, I would like to predict the gross profit. I was ...
RAbraham's user avatar
  • 187
1 vote
0 answers
22 views

Which MSE (total or individual) back-propagate for multi out regression neural network

When we have multi output regression neural network, we can calculate total MSE and individual MSE per output. How this MSE should back-propagate ? Shouldn't we back-propagate individual MSE through ...
Amalka's user avatar
  • 11
0 votes
1 answer
11k views

How to Minimize mean square error using Python

I want to minimise mean square error function to find best alpha value (decay rate) for my model. Here is the description of my model: ...
MAC's user avatar
  • 277
3 votes
1 answer
606 views

Confusion about the MSE ERROR

I created a Random Forest regressor model and calculated my own error. I also want to calculate MAE, MSE and RMSE to compare my results to similar use cases. I am confused by the results as the values ...
ml_learner's user avatar
3 votes
2 answers
4k views

Reason for generally using RMSE instead of MSE in Linear Regression

In linear regression, why we generally use RMSE instead of MSE? The rationale I know is that it's easy to minimize the error in RMSE instead of MSE by Gradient Descent, but I need to know the exact ...
SKB's user avatar
  • 554
1 vote
1 answer
63 views

Carlification of the MSE loss sum symbol

So I have a question regarding the MSE loss on the application of a Neural Network. Loss function: $\text{MSE} = \frac{1}{2} \sum_{i=1}^{n} (Y_i - \hat{Y_i}) ^ 2$ I ...
Lupos's user avatar
  • 133
1 vote
1 answer
51 views

why is MSE of prediction way different from loss over batches

I am new to machine learning so forgive me if i ask stupid question. I have a time series data and i split it into training and test set. This is my code: ...
T.Sokh's user avatar
  • 23
0 votes
1 answer
919 views

Coefficients of Linear regression for minimizing MSE

(I asked this in mathematics site, but nobody responded, it seems the whole problem is more related to data science than math.) In a regression problem, loss function is: $$L(a,b) = {\sum_{i=1}^n (y^...
Fatemeh Asgarinejad's user avatar
1 vote
1 answer
410 views

Math behind, $MSE = bias^2 + variance$

Based on the deeplearningbook: $$ \begin{align} MSE &= E[(\theta_m^{-} - \theta)^2] \\ &= Bias(\theta_m^{-})^2 + Var(\theta_m^{-})\\ \end{align} $$ where $m$...
Fatemeh Asgarinejad's user avatar
0 votes
2 answers
80 views

A substitute formula for MSE

I don't understand where this formula for Mean Squared Error is coming from. How do we arrive at: $$MSE = \frac{1}{m}||y' - y||_2^2$$ from: $$MSE = \frac{1}{m}\cdot\sum_i(y'_{i} - y_{i})^2$$ (The ...
Fatemeh Asgarinejad's user avatar