Commit b566d458 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Merge pull request #145 from skearnes/regressor_cost

Fix regressor cost
parents 3c8e5b6c 8d7f3991
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ class TensorflowRegressor(TensorflowGraph):
      A tensor with shape batch_size containing the weighted cost for each
      example.
    """
    return tf.mul(tf.nn.l2_loss(output - labels), weights)
    return tf.mul(0.5 * tf.square(output - labels), weights)

  def example_counts(self, y_true):
    """Get counts of examples in each class.