在LinearSVC中检测到的类仅支持二进制分类

时间:2019-04-06 18:19:20

标签: python machine-learning pyspark apache-spark-ml

在此处输入代码时出现以下错误。

   rf = LinearSVC(labelCol="indexedLabel", maxIter=10, regParam=0.1)
   pipeline = Pipeline(stages=[self.labelIndexer, self.featureIndexer, rf, 
   self.labelConverter])
   model = pipeline.fit(self.trainingData)

IllegalArgumentException: u'requirement failed: LinearSVC only supports binary classification. 99 classes detected in LinearSVC_6596220b55a3__labelCol'

0 个答案:

没有答案