# Questions tagged [mse]

33 questions

1

votes

2

answer

852

Views

### How to interpret MSE in Keras Regressor

I am new to Keras/TF/Deep Learning and I am trying to build a model to predict house prices.
I have some features X (no. of bathrooms , etc.) and target Y (ranging around $300,000 to $800,000)
I have used sklearn's Standard Scaler to standardize Y before fitting it to the model.
Here is my Keras mod...

1

votes

0

answer

317

Views

### Unsupported HLS video on iOS mobile

A quick backstory, I am building a baby-monitor with a Raspberry Pi and writing a web frontend with Node.JS. I have a handful of old phones that I plan to leave around the house so baby-monitors can be scattered about. So far much of the whole system works, except the HLS video components on iPhon...

1

votes

0

answer

116

Views

### 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 where j ranges from -20 to 20. However, there seems t...

1

votes

0

answer

29

Views

### 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 really need help, thanks in advance!
here is one r...

1

votes

2

answer

1.4k

Views

### Using lapply() for data structured in lists of lists from simulation study

I have run up against the wall regarding the application of lapply() in a simulation study. The data are designed to help us understand how a standardization formula impacts the outcomes of a proposal ratings exercise.
There are three conditions for raters: no bias, uniform bias (bias increases a...

1

votes

2

answer

838

Views

### Random Forest with two predictors

I'm using random forest to estimate the importance (%IncMSE) of a number of predictors. Afterwards, I use a combination of all predictors but one, and I calculate their importance again.
RandomForest works in theory even when only two predictors are used, but I'm wondering if it makes sense if the m...

1

votes

1

answer

418

Views

### Python Numpy mean of square calculation (is this the right way)

Not very good on python and numpy but working on a Mean Square Error for a machine learning code.
Want to do a python subroutine to return the mean square error based on the test_data and the following is the result.
The answer is great now (do not quote as x and y is already a matrix)
for (x, y)...

1

votes

1

answer

285

Views

### MSE and cross validation score drastically differ from residuals in scale for a GLM

I have encountered something which I believe is critical and will be of use for people in the future when fitting and analyzing GLM in R. The response in my dataset is a variable of frequency data and the set contains 1762 observations. I have fitted a Negative Binomial-model (named nb1) with the co...

1

votes

1

answer

1.6k

Views

### how to calculate GBM accuracy in r

I used the gbm() function to create the model and I want to get the accuracy. Here is my code:
df

1

votes

1

answer

240

Views

### 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 calculate the (R)MSE and PSNR without using a built-in...

1

votes

1

answer

0

Views

### How to calculate the RMSE on Ridge regression model

I have performed a ridge regression model on a data set
(link to the dataset: https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data)
as below:
from sklearn.linear_model import Ridge
from sklearn.model_selection import train_test_split
y = train['SalePrice']
X = train.drop('SalePr...

1

votes

2

answer

304

Views

### optimize MSE algorithm using openmp

I wanted to optimize below code using openMP
double val;
double m_y = 0.0f;
double m_u = 0.0f;
double m_v = 0.0f;
#define _MSE(m, t) \
val = refData[t] - calData[t]; \
m += val*val;
#pragma omp parallel
{
#pragma omp for
for( i=0; i

1

votes

1

answer

3k

Views

### PSNR values differ in matlab implementation and python

I have implemented a python code for calculating PSNR values of Y channel in YCrCb channel.
I get the PSNR values to be around 35.7dB(for a pair of images)
import cv2, main
import sys
i1 = cv2.imread(sys.argv[1])
i2 = cv2.imread(sys.argv[2])
i1= cv2.cvtColor(i1, cv2.COLOR_BGR2YCrCb)
i2= cv2.cvtColor...

1

votes

0

answer

18

Views

### top 35 unisex names rstudio

So I am using the 'babynames' package in rstudio and am trying to get the 35 most common unisex names. I have gotten pretty far, but I cant seem to figure out how to filter the data frame I have created to rank the names based on the mean squared error from the 50-50 line. Here is the code I have so...

1

votes

1

answer

67

Views

### 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 used in the link project.
train_data.shape
(11000,)
te...

0

votes

0

answer

5

Views

### How to apply sequentinal MSE model to data that is not binary?

I have been using this model with binary data to predict likely hood of play from this guide.
import tensorflow as tf
from tensorflow import keras
import numpy as np
import pandas as pd
model = keras.Sequential()
input_layer = keras.layers.Dense(3, input_shape=[3], activation='tanh')
model.add(inp...

2

votes

1

answer

2k

Views

### MSE calculation for grayscale images

I have two images(original and noisy). I'm calculating PSNR. I kinda did it for color RGB images, but i don't know how to do it with grayscale. As i read, MSE calculation is different. For RGB i'm doing it like you can see in following code (I'm using Visual C#):
for (int i = 0; i < bmp1.Width; i++)...

2

votes

1

answer

1k

Views

### 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
and 13.88 for the training data. First, shouldnt t...

3

votes

2

answer

6.6k

Views

### How to extract the CV errors for optimal lambda using glmnet package?

I'm using the glment package for regression in R. I do the cross validation using cv.fit

3

votes

1

answer

2.5k

Views

### 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 datasets and the problems. The learning algorithm is the b...

4

votes

1

answer

1.3k

Views

### the loss of mse always be 0 when keras for topic predict

my input is a 200 dims vector, which is generated by mean of the word2vector of all words of a article,
my output is a 50 dims vector,which is generated by the LDA results of a article
I want to use mse as the loss function,but the value of the loss always be 0
my code as follows:
model = Sequential...

2

votes

1

answer

1.1k

Views

### 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 my network learn to remove the clean image and not...

2

votes

1

answer

1k

Views

### VP9 WEBM video support in EDGE browser

I see that EDGE claims VP9 codec support in the latest versions by enabling the VP9 in MSE in their browser configuration.
I tried doing that and still, it doesn't work and it throws an error saying this type of video file isn't supported.
I had launched the https://html5test.com/compare/browser/myb...

3

votes

1

answer

1.2k

Views

### 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

3

votes

3

answer

327

Views

### Getting worse result using keras 2 than keras 1

I ran the same code (with the same data) on CPU first using keras 1.2.0 and then keras 2.0.3 in both codes keras is with TensorFlow backend and also I used sklearn for model selection, plus pandas to read data.
I was surprised when I got the MSE(Mean squared error) of 42 using keras 2.0.3 and 21 us...

4

votes

1

answer

838

Views

### Converting fragmented mp4 file for MSE (Media Source Extensions)

I'm looking for a way to generate proper fragmented *.mp4 files for MediaSourceExtension (Chrome).
I tried out the example from here: http://people.mozilla.org/~jyavenard/tests/mse_mp4/paper.html and with the given video file it worked just fine.
So I tried out some settings for avconv / MP4 box to...

2

votes

2

answer

135

Views

### Working with SSIM loss function in tensorflow for RGB images

I want to use SSIM metric as my loss function for the model I'm working on in tensorflow. SSIM should measure the similarity between my reconstructed output image of my denoising autoencoder and the input uncorrupted image (RGB).
As of what I understood, for using the SSIM metric in tensorflow, the...

2

votes

1

answer

343

Views

### Recursive daily forecast

I am doing a recursive one-step-ahead daily forecast with different time series models for 2010. For example:
set.seed(1096)
Datum=seq(as.Date('2008/1/1'), as.Date('2010/12/31'), 'days')
r=rnorm(1096)
y=xts(r,order.by=as.Date(Datum))
List.y=vector(mode = 'list', length = 365L)
for (i in 1:365) {
win...

2

votes

1

answer

1.3k

Views

### 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 of information?

2

votes

3

answer

27.8k

Views

### Finding Mean Squared Error?

I have produced a linear data set and have used lm() to fit a model to that dataset. I am now trying to find the MSE using mse()
I know the formula for MSE but I'm trying to use this function. What would be the proper way to do so? I have looked at the documentation, but I'm either dumb or it's just...

53

votes

0

answer

217

Views

### Meta.SE content should be discoverable on Meta.SO

Since the new Meta.SE was introduced, many discussions have come up on Meta.SO that already exist on Meta.SE.
As this answer by Tim Post shows, this is somewhat intentional and not viewed as a bad thing in itself.
To some extent, that's fine. It's good for broad 'political' ideas to be rehashed a...

14

votes

1

answer

293

Views

### Make clear before asking that there are two Meta sites

I see plenty of new questions getting asked on Meta.SO that are duplicates of older discussions that now often reside on Meta.SE.
I don't think that is a desirable thing in itself. New questions seem to often get a lot less discussion, input, and viewpoints than the 'original' conversations.
One r...

24

votes

3

answer

723

Views

### Meta Stack Overflow vs Meta Stack Exchange

Before asking this question, I already read the entire Q&A here: What kind of questions should we ask on Meta Stack Overflow and on Meta Stack Exchange?
But, I am really still confused. When navigating through the Meta SO questions, most of them seems to me Meta Stack Exchange questions. I will give...