Fix broken distance feature that was wrecking training

This commit is contained in:
Shaunak Kishore
2015-09-12 23:16:44 -04:00
parent f95eb7ac86
commit 8f336f9aad

View File

@ -172,7 +172,7 @@ function get_features(ins, out) {
Angle.subtract(ins.angles[1], ins.angles[0]),
Angle.subtract(out.angles[1], out.angles[0]),
(trivial ? 1 : 0),
distance,
distance/MAX_BRIDGE_DISTANCE,
];
}
@ -184,7 +184,7 @@ function hand_tuned_classifier(features) {
return -Angle.penalty(features[4]);
}
var angle_penalty = Angle.penalty(features[0]) + Angle.penalty(features[1]);
var distance_penalty = features[7]/MAX_BRIDGE_DISTANCE;
var distance_penalty = features[7];
if (features[0] > 0 && features[1] > 0 &&
features[2] + features[3] < -0.5*Math.PI) {
angle_penalty = angle_penalty/16;