Apache spark 为什么LogisticAggregator(Spark mllib.ml)不使用z-score规范化?
我发现Spark.mllib.ml包中的LogisticAggregator通过以下代码对功能值进行标准化:(value/featuresStd(index)。这与z分数标准化非常相似。我想知道为什么LogisticAggregator(Spark mllib.ml)不使用z分数标准化Apache spark 为什么LogisticAggregator(Spark mllib.ml)不使用z-score规范化?,apache-spark,apache-spark-mllib,Apache Spark,Apache Spark Mllib,我发现Spark.mllib.ml包中的LogisticAggregator通过以下代码对功能值进行标准化:(value/featuresStd(index)。这与z分数标准化非常相似。我想知道为什么LogisticAggregator(Spark mllib.ml)不使用z分数标准化 val margin = - { var sum = 0.0 features.foreachActive { (index, value) => if
val margin = - {
var sum = 0.0
features.foreachActive { (index, value) =>
if (featuresStd(index) != 0.0 && value != 0.0) {
sum += localCoefficientsArray(index) * (value / featuresStd(index))
}
}
sum + {
if (fitIntercept) localCoefficientsArray(dim) else 0.0
}
}
val multiplier = weight * (1.0 / (1.0 + math.exp(margin)) - label)
类定义:私有类LogisticAggregator(系数:Vector,numclass:Int,fitIntercept:Boolean,featuresStd:Array[Double],featuresMean:Array[Double])扩展可序列化