title: pyspark, logistic regression, how to get coefficient of respective features
body: <p>I am new to <code>Spark</code>, my current version is 1.3.1. And I want to implement logistic regression with <code>PySpark</code>, so, I found this example from <a href="http://spark.apache.org/docs/1.3.1/mllib-linear-methods.html#logistic-regression" rel="nofollow">Spark Python MLlib</a></p>
  
  <pre><code>from pyspark.mllib.classification import LogisticRegressionWithLBFGS
  from pyspark.mllib.regression import LabeledPoint
  from numpy import array
  
  # Load and parse the data
  def parsePoint(line):
      values = [float(x) for x in line.split(' ')]
      return LabeledPoint(values[0], values[1:])
  
  data = sc.textFile("data/mllib/sample_svm_data.txt")
  parsedData = data.map(parsePoint)
  
  # Build the model
  model = LogisticRegressionWithLBFGS.train(parsedData)
  
  # Evaluating the model on training data
  labelsAndPreds = parsedData.map(lambda p: (p.label, model.predict(p.features)))
  trainErr = labelsAndPreds.filter(lambda (v, p): v != p).count() / float(parsedData.count())
  print("Training Error = " + str(trainErr))
  </code></pre>
  
  <p>And I found the attributes of <code>model</code> are:</p>
  
  <pre><code>In [21]: model.&lt;TAB&gt;
  model.clearThreshold  model.predict         model.weights
  model.intercept       model.setThreshold  
  </code></pre>
  
  <p>How can I get the coefficients of logistic regression?</p>