[SPARK-14969][MLLIB] Remove duplicate implementation of compute in LogisticGradient

## What changes were proposed in this pull request?

This PR removes duplicate implementation of compute in LogisticGradient class

## How was this patch tested?

unit tests

Author: dding3 <dingding@dingding-ubuntu.sh.intel.com>

Closes #12747 from dding3/master.
This commit is contained in:
dding3 2016-04-29 10:19:51 +01:00 committed by Sean Owen
parent 7226e19067
commit 6d5aeaae26
2 changed files with 0 additions and 13 deletions

View file

@ -577,13 +577,6 @@ private[ann] object FeedForwardModel {
* @param dataStacker data stacker
*/
private[ann] class ANNGradient(topology: Topology, dataStacker: DataStacker) extends Gradient {
override def compute(data: Vector, label: Double, weights: Vector): (Vector, Double) = {
val gradient = Vectors.zeros(weights.size)
val loss = compute(data, label, weights, gradient)
(gradient, loss)
}
override def compute(
data: Vector,
label: Double,

View file

@ -146,12 +146,6 @@ class LogisticGradient(numClasses: Int) extends Gradient {
def this() = this(2)
override def compute(data: Vector, label: Double, weights: Vector): (Vector, Double) = {
val gradient = Vectors.zeros(weights.size)
val loss = compute(data, label, weights, gradient)
(gradient, loss)
}
override def compute(
data: Vector,
label: Double,