Closed WeichenXu123 closed 7 years ago
Add VLogisticRegression intercept support.
The implementation for intercept is similar to the one in spark mllib. The key point is following:
intercept
coefficients
VBinomialLogisticCostFun
margins
margin
features
gradient
1
multiplier
initial_intercept = \log{P(1) / P(0)} = \log{count_1 / count_0}
Note The standardization processing do not include intercept. The L2 regulization do not include intercept.
standardization
API change Add blockCoords: (Int, Int) parameter for f in VUtils.blockMatrixHorzZipVec and VUtils.blockMatrixHorzZipVec.
blockCoords: (Int, Int)
f
VUtils.blockMatrixHorzZipVec
Add VLogisticRegression intercept support.
The implementation for
intercept
is similar to the one in spark mllib. The key point is following:intercept
value in the last element of thecoefficients
DV.VBinomialLogisticCostFun
, when calculatingmargins
, fetchintercept
value from the last element of thecoefficients
DV and add it intomargin
.features
vector intogradient
, append a virtual column using value1
, and aggregate them using eachmultiplier
.Note The
standardization
processing do not includeintercept
. The L2 regulization do not includeintercept
.API change Add
blockCoords: (Int, Int)
parameter forf
inVUtils.blockMatrixHorzZipVec
andVUtils.blockMatrixHorzZipVec
.