title: Issue understanding splitting data in Scala using "randomSplit" for Machine Learning purpose
body: <p>Hi I am new in MLlib and I am reading the documents on Spark website about it. I have difficulty to understand why in the following code we need to cache "0" for training and "1" for testing:</p>
  
  <pre><code>  val splits = data.randomSplit(Array(0.6, 0.4), seed = 11L)
    val training = splits(0).cache()
    val test = splits(1)
  </code></pre>
  
  <p>Can anyone help me understanding the reason? As far as I know we need positive and negative samples so "1" can be positive and "0" can be negative, why it is divided like this?</p>
  
  <p>Thank you!</p>