Questions tagged [mse]

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

233 questions
3
votes
1 answer

negative values for mean squared errors in sae package for R

I have been using "sae" package for R to use small area estimations with spatial fay-herriot models (SFH). Using different distance matrices I occasionally obtained negative values of Mean Squared Errors (MSE). The following link may reference a…
jsollari
  • 33
  • 4
3
votes
0 answers

Why is MSE loss working better for multi-class classification problem than categorical crossentropy?

I have built a model with multiple heads, some doing regression and some classification. I then sum up all the losses in a weighted manner to backpropagate. For the classification heads, I use the one-hot encoding approach, and code takes argmax on…
3
votes
1 answer

keras mean squared error loss function for 3 dimensional time series output

I would like to verify my loss function because i have read that there are issues with the mse loss function in keras. Consider a lstm model in keras predicting a 3d time series as multi targets (y1, y2, y3). Suppose the shape of a batch of output…
mastersom
  • 525
  • 1
  • 9
  • 25
3
votes
0 answers

How to write masked MSE loss in Keras?

I was trying to write masked MSE loss: def mae_loss_masked(mask): def loss_fn(y_true, y_pred): abs_vec = tf.multiply(tf.abs(y_pred-y_true), mask) loss = tf.reduce_mean(abs_vec) return loss return loss_fn My…
mrgloom
  • 20,061
  • 36
  • 171
  • 301
3
votes
1 answer

Finding the mean squared error for a linear regression in python (with scikit learn)

I am trying to do a simple linear regression in python with the x-variable being the word count of a project description and the y-value being the funding speed in days. I am a bit confused as the root mean square error (RMSE) is 13.77 for the test…
Christina
  • 255
  • 2
  • 5
  • 19
3
votes
1 answer

Write a custom MSE loss function in Keras

I'm trying to create an image denoising ConvNet in Keras and I want to create my own loss function. I want it to take a noisy image as an input and to get the noise as an output. This loss function is pretty much like a MSE loss but which will make…
Nathan Hubens
  • 171
  • 2
  • 13
3
votes
1 answer

randomForest package in R mse calculation

I feel like I'm missing something very basic here. I've run a random forest regression: INTERP.rf<-randomForest(y~.,data=df,importance=T,mtry=3,ntree=300) and then extracted the predictions for the training…
Lisa Avery
  • 51
  • 4
3
votes
1 answer

random forest package in R

I use random forest package in R for regression, it gives me two kind of information: Mean of squared residuals and % Var explained. But I wanna calculate the RMSE and R^2 of the training and test sets, can anyone help me how can I find these kind…
Farhaneh Moradi
  • 109
  • 1
  • 1
  • 10
3
votes
1 answer

Training error and Validation error in Multiple Output Neural Network

I am developing a program to study Neural Networks, by now I understand the differences (I guess) of dividing a dataset into 3 sets (training, validating & testing). My networks may be of just one output or multiple outputs, depending on the…
gkapellmann
  • 313
  • 3
  • 19
2
votes
1 answer

Python to compute MSE for every row

I am trying to compute the MSE for every row in my dataframe, Below is my code- import pandas as…
John
  • 279
  • 1
  • 3
  • 16
2
votes
1 answer

Distributing art collection amongst heirs, aiming for specific distribution, minimizing mean square error

Suppose we have a legacy art collection consisting of a number of distinct pieces of art. This legacy is to be divided amongst a number of heirs, trying to match a desired distribution as closely as possible. Say we have 10 paintings, whose…
RocketNuts
  • 9,958
  • 11
  • 47
  • 88
2
votes
1 answer

What is loss in tensorflow evaluate()? is it MAE? MSE? how do I compare the result with other regression?

Previous developer apply neural network and give me result of loss, MSE and MAE. How do I compare these result with my models (Linear Regression)? I can calculate MSE and MAE, but what is loss?
J.Doe
  • 21
  • 2
2
votes
2 answers

10-fold cross-validation and obtaining RMSE

I'm trying to compare the RMSE I have from performing multiple linear regression upon the full data set, to that of 10-fold cross validation, using the KFold module in scikit learn. I found some code that I tried to adapt but I can't get it to work…
2
votes
2 answers

How to calculate mean absolute percentage error for regression probem in Python?

I am trying to calculate percentage error of the performance for regression problem. I tried some methods described in other answers but it seems to be not working properly, please let me know if you know/ have used or implemented any code to…
jd95
  • 404
  • 6
  • 14
2
votes
1 answer

How to calculate MSE criteria in RandomForestRegression?

I'm now using RandomForestRegressor from sklearn.ensemble to analyze a dataset and I select "mse" as the function to measure the quality of a split. But I'm not quite clear how the mse is calculated. Could anyone explain it to me here (better with…
Zhendong Cao
  • 139
  • 1
  • 5
1
2
3
15 16