Expand description
Input validation utilities
Functionsยง
- check_
array_ 2d - Check that a 2D array has valid shape and properties
- check_
consistent_ length - Check that all arrays have consistent first dimension (number of samples)
- check_
consistent_ length_ xy - Check that X and y have consistent number of samples (generic version)
- check_
finite - Check that array contains only finite values (no NaN or infinity)
- check_
finite_ 1d - Check that array contains only finite values (1D version)
- check_
matmul_ shapes - Check that matrices have compatible shapes for matrix multiplication
- check_
min_ classes - Check that we have at least min_classes distinct classes
- check_
min_ samples - Check that we have enough samples for the operation
- check_
non_ empty - Check that an array is not empty
- check_
non_ negative - Check that a parameter is non-negative
- check_
positive - Check that a parameter is positive
- check_
positive_ int - Check that integer parameter is positive
- check_
range - Check that a parameter is in a valid range
- check_
x_ y - Check that X and y have consistent number of samples
- check_
x_ y_ regression - Check that X and y have consistent number of samples (regression version)
- validate_
class_ labels - Check that class labels are valid (non-negative integers)
- validate_
classification_ predictions - Validate model prediction format for classification
- validate_
cv_ folds - Validate cross-validation fold indices
- validate_
feature_ importance - Validate feature importance values
- validate_
features - Validate feature matrix shape and contents
- validate_
learning_ rate - Validate learning rate parameter
- validate_
max_ iter - Validate maximum iterations parameter
- validate_
probability_ distribution - Validate probability distribution (must sum to 1, all non-negative)
- validate_
regression_ predictions - Validate model prediction format for regression
- validate_
regularization - Validate regularization parameter
- validate_
sample_ weights - Validate sample weights
- validate_
sparse_ matrix - Validate sparse matrix properties
- validate_
target - Validate target array
- validate_
target_ regression - Validate target array (regression version)
- validate_
time_ series - Validate time series data for temporal consistency
- validate_
tolerance - Validate tolerance parameter