MLUtils.loadLibSVMFile
1 import org.apache.spark.mllib.util.MLUtils// Load and parse the data file.2 3 val data =4 5 MLUtils.loadLibSVMFile(sc, "data/mllib/sample_libsvm_data.txt")6 7 // Split data into traini...