Skip to content

Commit

Permalink
Added comment on standard error of regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Armstrong committed Feb 26, 2019
1 parent 4a5e870 commit a9376cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*.bsc
*.CDR
*.db
*.db-shm
*.db-wal
*.def
*.dep
*.dll
Expand Down
7 changes: 3 additions & 4 deletions libaln/src/train_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,9 @@ void ALNAPI createNoiseVarianceFile()
yy = (y - X * betaHat);
ESS = yy.transpose() * yy;
NV = ESS /(Nearby + 1 - nDim); // ESS is the sum of squared errors.
// An ALN's mean squared error should be close to NV at this place.
// The noise variance is probably ESS/(Nearby + 1 - nDim) since the
// fitted linear piece removes nDim degrees of freedom)
noiseSampleSum += NV;
// For the noise variance we use ESS/(Nearby + 1 - nDim) which is
// the square of the standard error of regression. It differs from
// ESS because fitting the data removes nDim degrees of freedom.
if (NV < noiseSampleMin)noiseSampleMin = NV;
if (NV > noiseSampleMax)noiseSampleMax = NV;
// We set up TRfile for training on the NV samples
Expand Down

0 comments on commit a9376cd

Please sign in to comment.