public final class LogisticRegressionCostFunction extends Object implements CostFunction
| Constructor and Description |
|---|
LogisticRegressionCostFunction(de.jungblut.math.DoubleMatrix x,
de.jungblut.math.DoubleMatrix y,
double lambda) |
| Modifier and Type | Method and Description |
|---|---|
CostGradientTuple |
evaluateCost(de.jungblut.math.DoubleVector theta)
Evaluation for the cost function to retrieve cost and gradient.
|
public LogisticRegressionCostFunction(de.jungblut.math.DoubleMatrix x,
de.jungblut.math.DoubleMatrix y,
double lambda)
x - normal feature matrix, column 0 should contain the bias.y - normal outcome matrix, for multiple classes use the one-hot
encoding. This matrix should be transposed.lambda - l1 reg parameter.public CostGradientTuple evaluateCost(de.jungblut.math.DoubleVector theta)
CostFunctionevaluateCost in interface CostFunctiontheta - a given input vectorCopyright © 2016. All rights reserved.