lichenglin created SPARK-15478: ---------------------------------- Summary: LogisticRegressionModel 's Coefficients always be a empty vector Key: SPARK-15478 URL: https://issues.apache.org/jira/browse/SPARK-15478 Project: Spark Issue Type: Bug Components: MLlib Affects Versions: 1.6.1 Reporter: lichenglin
I don't know if this is a bug. I'm runing the sample code like this <code> public static void main(String[] args) { SQLContext sqlContext = getSQLContext(); DataFrame training = sqlContext.read().format("libsvm") .load("file:///E:/workspace-mars/bigdata/sparkjob/data/mllib/sample_libsvm_data.txt"); LogisticRegression lr = new LogisticRegression().setMaxIter(10).setRegParam(0.3).setElasticNetParam(0.8); // Fit the model LogisticRegressionModel lrModel = lr.fit(training); // Print the coefficients and intercept for logistic regression System.out.println("Coefficients: " + lrModel.coefficients() + " Intercept: " + lrModel.intercept()); } </code> but the Coefficients always return a empty vector. <code> Coefficients: (692,[],[]) Intercept: 2.751535313041949 </code> -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org