org.apache.spark.mllib.util
Class DataValidators

Object
  extended by org.apache.spark.mllib.util.DataValidators
All Implemented Interfaces:
Logging

public class DataValidators
extends Object
implements Logging

:: DeveloperApi :: A collection of methods used to validate data before applying ML algorithms.


Constructor Summary
DataValidators()
           
 
Method Summary
static scala.Function1<RDD<LabeledPoint>,Object> binaryLabelValidator()
          Function to check if labels used for classification are either zero or one.
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}.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 

Constructor Detail

DataValidators

public DataValidators()
Method Detail

binaryLabelValidator

public static scala.Function1<RDD<LabeledPoint>,Object> 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

public 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}.

Parameters:
k - (undocumented)
Returns:
True if labels are all in the range of {0, 1, ..., k-1}, false otherwise.