mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
Adjusted testing scenario and regression itself to christophers R example
This commit is contained in:
1 parent
be98b84324
commit
393a5e1b37
2 files changed
+24
-84
No files matched your search
+2
-2
@@ -42,12 +42,12 @@ public class OnlineMultiVariateRegressionImpl implements OnlineMultiVariateRegre
|
||||
checkNumberOfDimensions(x);
|
||||
numberOfAddedPoints++;
|
||||
double[] newWeights = initializeDoubleArray(weights.length);
|
||||
double alpha = 0.01;
|
||||
double alpha = 0.03;
|
||||
newWeights[0] = weights[0] + alpha * (y - estimateY(x));
|
||||
for (int i = 1; i < weights.length; i++) {
|
||||
incrementallyUpdateVariances(x, i);
|
||||
double normalizedInput = (x[i-1] - means[i-1]) / Math.sqrt(variances[i-1]);
|
||||
newWeights[i] = weights[i] + Math.pow(alpha, i)*(y - estimateY(x)) * x[i-1];//normalizedInput;
|
||||
newWeights[i] = weights[i] + alpha * (y - estimateY(x)) * Math.pow(alpha, i) * x[i-1];//normalizedInput;
|
||||
}
|
||||
weights = newWeights;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user