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
0
votes
1 answer

PyTorch MSE Loss differs from direct calculation by factor of 2

Why does the result of torch.nn.functional.mse_loss(x1,x2) result differ from the direct computation of the MSE? My test code to reproduce: import torch import numpy as np # Think of x1 as predicted 2D coordinates and x2 of ground truth x1 =…
csstudent1418
  • 289
  • 5
  • 14
0
votes
0 answers

how to measure quality of sharpening in images

I have a distorted (blurred image) and I perform several deconvolution algorithms on it to sharpen it (Richardson lucy, regularized inverse filter, tikhonov miller). And i want to measure each performance by calculating the MSE (mean square error).…
gin
  • 873
  • 2
  • 12
  • 23
0
votes
1 answer

nn.MSELoss inputs dimension mismatch problem

I recently started learning how to use torch but when I was dealing with the sequential data. For example, the training x (input) is a tensor with shape ([1, 60, 278]), while the training y (target) has the shape ([1, 278]). The batch size is simply…
Charles Yan
  • 83
  • 1
  • 1
  • 9
0
votes
2 answers

The standard way to evaluate multi-step timeseries predicted values with the true values?

I'm working in a time series forecasting: if I have the target column (y) as a stock price to be forecasted, I have a test data set size of 65 observations, suppose that the prediction length (predicated prices for future days) = 20. So, each…
0
votes
0 answers

Error for k-fold cross-validation and PCR in R with simulated data

For my thesis I am seeing whether 5-fold cross-validation can be used to find the optimal number of principal component in PCR for time series data. I am using a 3 factor model. However, when I try to run the PCR code I get an error as the data…
Mieska
  • 1
  • 1
0
votes
0 answers

How to calculate the validation loss in this model?

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 I should calculate the mean of all the history…
0
votes
0 answers

Why does training loss increase in my Pytorch Linear regression model?

I'm trying to train a linear regression model with pytorch and use the code from here. I made several changes to the original code: 1. change the datasize n_data from 11 to 1e5, 2. decrease the learning rate to 1e-8, 3. to enforce the model trained…
0
votes
0 answers

KNNImputer Evaluation

I used KNNImputer for missing values in my dataset, I have a problem with the evaluation of this method while I am using MAE or MSE to compare both datasets, I received the error: Input contains NaN, infinity or a value too large for…
Sepide H
  • 13
  • 2
0
votes
0 answers

Out of sample statistics (MSE-F; ENC-NEW, MSFE adjusted test statistic)

I performed and out of sample on linear regression. I would like to compute the following metrics: MSE-F statistic (McCracken 2007) Encompassing test statistic (Clark and McCracken 2001) MSFE-adjusted test statistic (Clark and West 2007) Is there…
0
votes
2 answers

Pytorch's nn.BCEWithLogitsLoss() behaves totaly differently than nn.BCELoss()

i'm totally new to pytorch. I was taking an e-course and was experimenting with pytorch. So i came across the two loss functions(The hypothesis for using these two losses is numerical stability with…
0
votes
1 answer

Using a target size (torch.Size([64, 1])) that is different to the input size (torch.Size([64, 20, 64])) incorrect results due to broadcasting

First of all, I am playing around with Python/PyTorch/LSTM for no good reason. Just curious is all. I "think" I have all of my tensors configured correctly. My window size is 20. My batch size is 64. These are their shapes when I feed them to…
GeorgeIV
  • 13
  • 3
0
votes
0 answers

How do I calculate R-squared from LightGBM cross-validated models in R?

I'm trying to run LightGBM with 5-fold cross-validation to predict the first 123 PCs of a plasma metabolite principal component analysis. I'd like to get the R-squared for the best iteration for each outcome, but can't find a direct way to extract…
0
votes
1 answer

How to automatically calculate RMSE per group for fitting data in R?

For example, I have data like below. genotype=rep(c("A","B","C","D","E"), each=5) env=rep(c(10,20,30,40,50), time=5) outcome=c(10,15,17,19,22,12,13,15,18,25,10,11,12,13,18,11,15,20,22,28,10,9,10,12,15) dataA=data.frame(genotype,env,outcome) Then, I…
Jin.w.Kim
  • 599
  • 1
  • 4
  • 15
0
votes
0 answers

what are the good metrics that I can compare the performance of the result of several time-frequency transformations result quantitatively?

I generated a non-stationary signal and I want to apply several time-frequency transformation methods such as STFT, Continous Wavelet Transform(CWT), Wigner-Ville Distribution (WVD) to this signal and compare the performance of the results…
0
votes
0 answers

Neural network | The problem of fitting the model to the data | MSE value too high

I'm new to neural networks (actually, this is my first time using python). I have created a simple neural network whose task is to predict inflation based on historical data on inflation, average salary, unemployment, and the number of unemployed.…