Database Reference
In-Depth Information
val svmModel = SVMWithSGD.train(data, numIterations)
You will see the following output:
...
14/12/06 13:43:08 INFO DAGScheduler: Job 94 finished:
reduce at RDDFunctions.scala:112, took 0.007192 s
14/12/06 13:43:08 INFO GradientDescent:
GradientDescent.runMiniBatchSGD finished. Last 10
stochastic losses 1.0, 2398226.619666797,
2196192.9647478117, 3057987.2024311484, 271452.9038284356,
3158131.191895948, 1041799.350498323, 1507522.941537049,
1754560.9909073508, 136866.76745605646
svmModel: org.apache.spark.mllib.classification.SVMModel =
(weights=[-0.12218838697834929,-0.5275107581589767,
...
Then, we will train the naïve Bayes model; remember to use your special non-negative
feature dataset:
val nbModel = NaiveBayes.train(nbData)
The following is the output:
...
14/12/06 13:44:48 INFO DAGScheduler: Job 95 finished:
collect at NaiveBayes.scala:120, took 0.441273 s
nbModel:
org.apache.spark.mllib.classification.NaiveBayesModel =
org.apache.spark.mllib.classification.NaiveBayesModel@666ac612
...
Finally, we will train our decision tree:
val dtModel = DecisionTree.train(data, Algo.Classification,
Entropy, maxTreeDepth)
The output is as follows:
Search WWH ::




Custom Search