Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
catch exception added
  • Loading branch information
sos13004 committed Apr 29, 2017
1 parent 58ed898 commit f511ac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LearningEvaluator.java
@@ -1,6 +1,7 @@
import java.util.ArrayList;
import org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression;
import org.apache.commons.math3.linear.SingularMatrixException;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import java.util.Arrays;

public class LearningEvaluator extends BaseEvaluator{
Expand Down Expand Up @@ -57,6 +58,8 @@ public class LearningEvaluator extends BaseEvaluator{
commitWeights(this.file);
} catch(SingularMatrixException e) {
System.out.println("Matrix was singular, not updating weights");
} catch(MathIllegalArgumentException e){
System.out.println("Not enough data, not updating end game weights");
}
values.clear();
params.clear();
Expand Down
2 changes: 2 additions & 0 deletions src/weights/alpha.csv
Expand Up @@ -236,3 +236,5 @@
2894.5183569896217, -24.261531583697504, 15.034595717336051, 178.48968012671259, 23.70426382401744, 5.441287376691758, 49.0007935946269, -259.1269445462735, -232.5596315889493, -5.329598328618745, -6.994636135055675, -13.244975077862328
2944.668512245323, -25.21731850468463, 14.854772185388837, 187.44524414324124, 19.682623746127724, 4.2729992145885, 44.46179377944801, -261.69593216723047, -232.53545342651304, -1.472468962139943, -8.644497633245395, -17.22580253861976
3009.069370626828, -24.285677007924463, 24.688977766025346, 176.62705146719483, 6.447126303312221, 2.783552147365609, 28.749676932008803, -235.2302515085287, -203.36431054211803, 4.213613222647522, -20.234164528178965, -33.25310964667955
2951.067530543304, -159.07099066266204, 16.837221893320123, 158.6878560788984, 52.132792011639026, 1.1745039423919537, 22.11531839161577, -213.2550912106616, -206.78247181020814, -20.40688911191529, -0.3805666720408354, -45.33789581556924
2866.8868904237856, -142.13229030893228, 11.545188736211793, 158.22309853916653, 50.9989591432032, -1.4138683076089993, 42.09622930223864, -180.73092999185428, -197.7998025583713, -12.609385626558296, -7.192390557638213, -44.40457584552302

0 comments on commit f511ac8

Please sign in to comment.