title: How to perform regression analysis in Spark MLlib for churn determination in telecom industry?
body: <p>I am working on <code>churn</code> prediction(whether a customer move to another company) in telecom industry using <code>decision tree</code>(<code>supervised learning</code>). I have a dataset with following structure(<code>csv</code> data):</p>
  
  <pre><code>number vmail messages,total call minutes,total number of calls,total call charge,number of customer service calls,churn
  </code></pre>
  
  <p>In this the last column (<code>churn</code>) is a <code>true</code> or <code>false</code> value column and serves as a label. During testing I want to predict the values for this column (either as true-false or 0-1). My doubt is that how can I train the data using <code>Spark MLlibs</code> <code>decision tree</code> algorithm? I was going through the <code>regression example</code> given in the <a href="http://spark.apache.org/docs/latest/mllib-decision-tree.html" rel="nofollow">documentation</a> and I am unable to understand as where are they providing the <code>labels</code> during the training phase. The example has:</p>
  
  <pre><code>val categoricalFeaturesInfo = Map[Int, Int]()
  val impurity = "variance"
  val maxDepth = 5
  val maxBins = 32
  
  val model = DecisionTree.trainRegressor(trainingData, categoricalFeaturesInfo, impurity,
    maxDepth, maxBins) 
  </code></pre>
  
  <p>Since it is a supervised learning shouldn't we be providing the labels as well when training the model?</p>
  
  <p>How can I train my model on my data with providing the <code>labels</code> and then test to predict the <code>labels</code> for the test data?</p>