-
Notifications
You must be signed in to change notification settings - Fork 0
Validation utilities
torml edited this page Sep 24, 2026
·
1 revision
Shared helpers in torml.utils (all torch-backed):
-
check_array— dtype (torch.dtypeor"float32"string),ensure_2d,allow_nd,copy,force_all_finite, min samples/features, device preservation. -
check_X_y— paired validation with equal-length enforcement. -
check_is_fitted— raisesNotFittedError(aValueError) when fitted attributes (coef_,intercept_,labels_,classes_) are missing. -
check_random_state—None/int/torch.Generator→ generator. -
check_scalar— type + bounds checking for hyperparameters.