Returns a new vector with 1.0
(bias) appended to the input vector.
Returns a new vector with 1.0
(bias) appended to the input vector.
Converts matrix columns in an input Dataset to the org.apache.spark.mllib.linalg.Matrix
type from the new org.apache.spark.ml.linalg.Matrix type under the spark.ml
package.
Converts matrix columns in an input Dataset to the org.apache.spark.mllib.linalg.Matrix
type from the new org.apache.spark.ml.linalg.Matrix type under the spark.ml
package.
input dataset
a list of matrix columns to be converted. Old matrix columns will be ignored. If unspecified, all new matrix columns will be converted except nested ones.
the input DataFrame
with new matrix columns converted to the old matrix type
Converts Matrix columns in an input Dataset from the org.apache.spark.mllib.linalg.Matrix
type to the new org.apache.spark.ml.linalg.Matrix type under the spark.ml
package.
Converts Matrix columns in an input Dataset from the org.apache.spark.mllib.linalg.Matrix
type to the new org.apache.spark.ml.linalg.Matrix type under the spark.ml
package.
input dataset
a list of matrix columns to be converted. New matrix columns will be ignored. If unspecified, all old matrix columns will be converted except nested ones.
the input DataFrame
with old matrix columns converted to the new matrix type
Converts vector columns in an input Dataset to the org.apache.spark.mllib.linalg.Vector
type from the new org.apache.spark.ml.linalg.Vector type under the spark.ml
package.
Converts vector columns in an input Dataset to the org.apache.spark.mllib.linalg.Vector
type from the new org.apache.spark.ml.linalg.Vector type under the spark.ml
package.
input dataset
a list of vector columns to be converted. Old vector columns will be ignored. If unspecified, all new vector columns will be converted except nested ones.
the input DataFrame
with new vector columns converted to the old vector type
Converts vector columns in an input Dataset from the org.apache.spark.mllib.linalg.Vector
type to the new org.apache.spark.ml.linalg.Vector type under the spark.ml
package.
Converts vector columns in an input Dataset from the org.apache.spark.mllib.linalg.Vector
type to the new org.apache.spark.ml.linalg.Vector type under the spark.ml
package.
input dataset
a list of vector columns to be converted. New vector columns will be ignored. If unspecified, all old vector columns will be converted except nested ones.
the input DataFrame
with old vector columns converted to the new vector type
Version of kFold()
taking a Long seed.
Version of kFold()
taking a Long seed.
Return a k element array of pairs of RDDs with the first element of each pair containing the training data, a complement of the validation data and the second element, the validation data, containing a unique 1/kth of the data.
Return a k element array of pairs of RDDs with the first element of each pair containing the training data, a complement of the validation data and the second element, the validation data, containing a unique 1/kth of the data. Where k=numFolds.
Loads labeled points saved using RDD[LabeledPoint].saveAsTextFile
with the default number of
partitions.
Loads labeled points saved using RDD[LabeledPoint].saveAsTextFile
with the default number of
partitions.
Loads labeled points saved using RDD[LabeledPoint].saveAsTextFile
.
Loads labeled points saved using RDD[LabeledPoint].saveAsTextFile
.
Spark context
file or directory path in any Hadoop-supported file system URI
min number of partitions
labeled points stored as an RDD[LabeledPoint]
Loads binary labeled data in the LIBSVM format into an RDD[LabeledPoint], with number of features determined automatically and the default number of partitions.
Loads binary labeled data in the LIBSVM format into an RDD[LabeledPoint], with number of features determined automatically and the default number of partitions.
Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], with the default number of partitions.
Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], with the default number of partitions.
Loads labeled data in the LIBSVM format into an RDD[LabeledPoint].
Loads labeled data in the LIBSVM format into an RDD[LabeledPoint]. The LIBSVM format is a text-based format used by LIBSVM and LIBLINEAR. Each line represents a labeled sparse feature vector using the following format:
label index1:value1 index2:value2 ...
where the indices are one-based and in ascending order. This method parses each line into a org.apache.spark.mllib.regression.LabeledPoint, where the feature indices are converted to zero-based.
Spark context
file or directory path in any Hadoop-supported file system URI
number of features, which will be determined from the input data if a nonpositive value is given. This is useful when the dataset is already split into multiple files and you want to load them separately, because some features may not present in certain files, which leads to inconsistent feature dimensions.
min number of partitions
labeled data stored as an RDD[LabeledPoint]
Loads vectors saved using RDD[Vector].saveAsTextFile
with the default number of partitions.
Loads vectors saved using RDD[Vector].saveAsTextFile
with the default number of partitions.
Loads vectors saved using RDD[Vector].saveAsTextFile
.
Loads vectors saved using RDD[Vector].saveAsTextFile
.
Spark context
file or directory path in any Hadoop-supported file system URI
min number of partitions
vectors stored as an RDD[Vector]
Save labeled data in LIBSVM format.
Save labeled data in LIBSVM format.
an RDD of LabeledPoint to be saved
directory to save the data
Helper methods to load, save and pre-process data used in ML Lib.