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
1
vote
1 answer

Adding a if condition in a custom loss mse function

I'm trying to use a custom loss mse function with keras to put more emphasize on small value of a DNN model. I did try something like this: import keras.backend as K def scaled_mse(y_true,y_pred): loss = K.square(y_pred - y_true) if…
1
vote
1 answer

Nested Loops for Calculating MSE of Random Forest

I am trying to calculate MSE for multiple random forests which are created by changing mtry, nodesize, and ntree parameters. I use those parameters as variables in randomForest function and I created 3 "for" loops using those variables as indexes. I…
1
vote
1 answer

XGBoost custom evaluation function causing "cannot coerce type closure to vector of type"

I have tried a number of different things but cannot get rid of this error message. Do not see how my code differs from numerous other scripts. y_train = train$y train$y = c() train= as.matrix(train) train = xgb.DMatrix(data = train, label =…
Harald123
  • 13
  • 3
1
vote
1 answer

RMSE and Average Target Variable

I have a regression problem and I want to evaluate the performance of my model using: RMSE MSE MAE MAPE R2 I am also reporting the average of the target variable in the testing data Previously my model was achieving an RMSE ~ 40 and the average…
Perl Del Rey
  • 959
  • 1
  • 11
  • 25
1
vote
2 answers

Keras: model.prediction does not match model.evaluation loss

I applied this tutorial https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/23_Time-Series-Prediction.ipynb (on a different dataset), the turorial did not compute the mean squared error from individual output, so I added the following…
Manal
  • 75
  • 3
  • 12
1
vote
1 answer

Regularized polynomial regression on linear data - penalize only degree 2 coefficient

I've implemented gradient descent in Python to perform a regularized polynomial regression using as a loss function the MSE, but on linear data (to prove the role of the regularization). So my model is under the form: And in my loss function, R…
Hakim
  • 3,225
  • 5
  • 37
  • 75
1
vote
2 answers

How can we get current rendering stream details in Shaka player?

getStats() api provides the current variant being downloaded. Is there a way To get the current rendering variant? Get notified when rendering variant gets changed ? Both of these are available in hls.js.
sbr
  • 4,735
  • 5
  • 43
  • 49
1
vote
0 answers

Changing Loss Functions in R (LM/GLM)

How can I provide MAPE or MAE instead of RMSE as loss function in GLM or LM in R? Would like to see any good reason why there is no option to provide a custom loss function to LM algorithms in R
Yash
  • 307
  • 3
  • 10
1
vote
0 answers

How do I calculate MSE on the test data for a lasso regression in R?

I am trying to find MSE of the test set for a lasso regression in R. I have used the glmnet formula to create the lasso model, but using the model to calculate MSE as in the code below gives the following error: Error in cbind2(1, newx) %*% nbeta :…
1
vote
0 answers

Measure Accuracy errors print NA

I'm building ARIMA model on my data and when I try to check the Measure Accuracy errors , it print NA! I don't know where I missed up. Does any one have suggestions please ? accuracy(forecast_data, test_data) $Models Call …
Reta
  • 363
  • 3
  • 4
  • 15
1
vote
1 answer

why MSE on test set is very low and doesn't seem to evolve (not increasing after increasing epochs)

I am working on a problem of predicting stock values using LSTMs. My work is based on the following project . I use a data set (time series of stock prices) of total length 12075 that I split into train and test set (almost 10%). It is the same…
Othmane
  • 1,094
  • 2
  • 17
  • 33
1
vote
0 answers

Stock data linear regression by sklearn

I am using the Sklearn to do the linear regression for a set of stock price data, after I normalized the data, the MSE all becomes 0. Why I get all MSE 0? and please help me, somebody said it's because the model problem.. but I am python newbie, and…
1
vote
0 answers

How does the MSE loss function work in pytorch?

In the following code (extracted from SentEval), a neural network structure is defined which maps 1024 real numbers to 5 output predictions. The problem is to assess the relatedness between two sentences (each represented with 512 features). The…
Hossein
  • 2,041
  • 1
  • 16
  • 29
1
vote
1 answer

PSNR/MSE calculation for two images

I want to write a function which is getting two images reference and encoded and evaluates the (R)MSE and PSNR for each component (R, G, B, Y, Cb, Cr). For that, I am extracting all components and then I am converting the RGB -> YCbCr. I want to…
Georgi Stoyanov
  • 594
  • 1
  • 9
  • 26
1
vote
0 answers

Implementing custom mse loss function in tensorflow

I am trying to implement a custom loss function on TensorFlow to calculate circular mean squared error loss. I am taking the difference of true and predicted values, y and yPredict which are both vectors (1D). I am adding another variable 2*j*pi…