Converts input of type Any to Double.
Converts input of type Any to Double. Does this by casting to java.lang.Number, and then taking the double value.
Will return Double.NaN in the case of bad input.
input to be converted to Double.
Double representation of the number, or Double.NaN if impossible.
An ugly function that handles the case where data that was a long, has been converted to a double and then can't be converted back i.
An ugly function that handles the case where data that was a long, has been converted to a double and then can't be converted back i.e. 10 becomes 10.0 and then creating a dataFrame with an integer or long column fails. A non numeric input in a double or integer column will be converted to null, since round of Double.NAN is 0. Set the value of the nullable parameter to true in order to keep the behavior where null values in Integer and Long columns are converted to zeros.
and rdd of some sequence type that will be the body of the DataFrame
the schema that we want tthe new RDD to conform to
rowRDD with each value parsed so it won't cause failures when sqlContext.createDataFrame(rowRDD, schema) is called
Index of the dependent column in the column set.
Indices of the independent columns.
Function mapping a Row of the correct schema to a labelled point.
Helper functions that are useful for working with MLlib.