Package org.apache.spark.mllib.util
Class DataValidators
Object
org.apache.spark.mllib.util.DataValidators
A collection of methods used to validate data before applying ML algorithms.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic scala.Function1<RDD<LabeledPoint>,
Object> Function to check if labels used for classification are either zero or one.static org.apache.spark.internal.Logging.LogStringContext
LogStringContext
(scala.StringContext sc) static scala.Function1<RDD<LabeledPoint>,
Object> multiLabelValidator
(int k) Function to check if labels used for k class multi-label classification are in the range of {0, 1, ..., k - 1}.static org.slf4j.Logger
static void
org$apache$spark$internal$Logging$$log__$eq
(org.slf4j.Logger x$1)
-
Constructor Details
-
DataValidators
public DataValidators()
-
-
Method Details
-
binaryLabelValidator
Function to check if labels used for classification are either zero or one.- Returns:
- True if labels are all zero or one, false otherwise.
-
multiLabelValidator
Function to check if labels used for k class multi-label classification are in the range of {0, 1, ..., k - 1}.- Parameters:
k
- (undocumented)- Returns:
- True if labels are all in the range of {0, 1, ..., k-1}, false otherwise.
-
org$apache$spark$internal$Logging$$log_
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_() -
org$apache$spark$internal$Logging$$log__$eq
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) -
LogStringContext
public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc)
-