Does PySpark ML LogisticRegression weightCol implement a sampleWeight or classWeight?

Viewed 1970

I'm defining a binary LogisticRegression pipeline in PySpark ML for a largely imbaalnced dataset.

lr = LogisticRegression(maxIter=10, regParam=0.001, weightCol="weight")

The API contains an option for weightCol='weight', which I want to use for my imbalanced dataset. The docs for Pyspark 2.3.0.

weightCol = Param(parent='undefined', name='weightCol', doc='weight column name. If this is not set or empty, we treat all instance weights as 1.0.')

Yes, very verbose...

Is this a sample weight, or a class weight?

I cannot find any information on this elsewhere in the documentation.

1 Answers
Related