Constructs a LogisticRegressionModel with weights and intercept for binary classification.
Weights computed for every feature.
Intercept computed for this model. (Only used in Binary Logistic Regression. In Multinomial Logistic Regression, the intercepts will not be a single value, so the intercepts will be part of the weights.)
the dimension of the features.
the number of possible outcomes for k classes classification problem in Multinomial Logistic Regression. By default, it is binary logistic regression so numClasses will be set to 2.
:: Experimental ::
Clears the threshold so that predict
will output raw prediction scores.
:: Experimental ::
Clears the threshold so that predict
will output raw prediction scores.
Current version of model save/load format.
Current version of model save/load format.
:: Experimental :: Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
:: Experimental :: Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
Intercept computed for this model.
Intercept computed for this model. (Only used in Binary Logistic Regression. In Multinomial Logistic Regression, the intercepts will not be a single value, so the intercepts will be part of the weights.)
the number of possible outcomes for k classes classification problem in Multinomial Logistic Regression.
the number of possible outcomes for k classes classification problem in Multinomial Logistic Regression. By default, it is binary logistic regression so numClasses will be set to 2.
the dimension of the features.
Predict values for examples stored in a JavaRDD.
Predict values for examples stored in a JavaRDD.
JavaRDD representing data points to be predicted
a JavaRDD[java.lang.Double] where each entry contains the corresponding prediction
Predict values for a single data point using the model trained.
Predict values for a single data point using the model trained.
array representing a single data point
Double prediction from the trained model
Predict values for the given data set using the model trained.
Predict values for the given data set using the model trained.
RDD representing data points to be predicted
RDD[Double] where each entry contains the corresponding prediction
Predict the result given a data point and the weights learned.
Predict the result given a data point and the weights learned.
Row vector containing the features for this data point
Column vector containing the weights of the model
Intercept of the model.
Save this model to the given path.
Save this model to the given path.
This saves:
The model may be loaded using Loader.load.
Spark context used to save model data.
Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
:: Experimental :: Sets the threshold that separates positive predictions from negative predictions in Binary Logistic Regression.
:: Experimental :: Sets the threshold that separates positive predictions from negative predictions in Binary Logistic Regression. An example with prediction score greater than or equal to this threshold is identified as an positive, and negative otherwise. The default value is 0.5.
Weights computed for every feature.
Weights computed for every feature.
Classification model trained using Multinomial/Binary Logistic Regression.