I have a 2 column (1 int and 1 double) dataframe "fit_comparison", of predicted values and linear regression results.
I have used the following code to get regression metrics:
val rm = new RegressionMetrics(
fit_comparison.rdd.map(x =>
(x(0).asInstanceOf[Double], x(1).asInstanceOf[Double])))
When I try to get specific regression metrics as below, I get the "java.lang.Integer cannot be case to java.lang.Double" error.
println("MSE: " + rm.meanSquaredError)
Do I first have to convert the first column of "fit_comparison" to a double?
Any help is appreciated, thank you,
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)