Skip to main content

automl.utils

len_labels

def len_labels(y: Any, return_labels=False) -> Union[int, Tuple[int, Any]]

Count labels locally, importing Spark only for an already-distributed input.

unique_value_first_index

def unique_value_first_index(y: np.ndarray) -> Tuple[np.ndarray, np.ndarray]

Get the unique values and indices of a pandas series or numpy array. The non-spark version of flaml.automl.spark.utils.unique_value_first_index