April 2017
Intermediate to advanced
532 pages
12h 39m
English
We will perform a similar analysis for step size in the following code:
Scala
val steps_param = Array(0.01, 0.025, 0.05, 0.1, 1.0) val intercept =false val i = 0 val results = new Array[String](5) val resultsMap = new scala.collection.mutable.HashMap[String, String] val dataset = new DefaultCategoryDataset() for(i <- 0 until steps_param.length) { val step = steps_param(i) val rmsle = LinearRegressionUtil.evaluate(train_data, test_data,iterations,step,intercept) resultsMap.put(step.toString,rmsle.toString) dataset.addValue(rmsle, "RMSLE", step) }
Output for the previous code is as follows:
[1.7904244862988534, 1.4241062778987466, 1.3840130355866163, 1.4560061007109475, nan]
The plot for the preceding output is shown as ...
Read now
Unlock full access