Repeated Stratified K-Fold cross validator.
Repeats Stratified K-Fold n times with different randomization in each repetition.
Read more in the User Guide.
new RepeatedStratifiedKFold(opts?: object): RepeatedStratifiedKFold;
Name | Type | Description |
---|---|---|
opts? |
object |
- |
opts.n_repeats? |
number |
Number of times cross-validator needs to be repeated. Default Value 10 |
opts.n_splits? |
number |
Number of folds. Must be at least 2. Default Value 5 |
opts.random_state? |
number |
Controls the generation of the random states for each repetition. Pass an int for reproducible output across multiple function calls. See Glossary. |
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:25
Disposes of the underlying Python resources.
Once dispose()
is called, the instance is no longer usable.
dispose(): Promise<void>;
Promise
<void
>
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:108
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
get_metadata_routing(opts: object): Promise<any>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.routing? |
any |
A MetadataRequest encapsulating routing information. |
Promise
<any
>
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:127
Returns the number of splitting iterations in the cross-validator
get_n_splits(opts: object): Promise<number>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
any |
Always ignored, exists for compatibility. np.zeros(n\_samples) may be used as a placeholder. |
opts.groups? |
ArrayLike |
Group labels for the samples used while splitting the dataset into train/test set. |
opts.y? |
any |
Always ignored, exists for compatibility. np.zeros(n\_samples) may be used as a placeholder. |
Promise
<number
>
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:165
Initializes the underlying Python resources.
This instance is not usable until the Promise
returned by init()
resolves.
init(py: PythonBridge): Promise<void>;
Name | Type |
---|---|
py |
PythonBridge |
Promise
<void
>
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:62
Generates indices to split data into training and test set.
split(opts: object): Promise<ArrayLike>;
Name | Type | Description |
---|---|---|
opts |
object |
- |
opts.X? |
ArrayLike [] |
Training data, where n\_samples is the number of samples and n\_features is the number of features. |
opts.groups? |
ArrayLike |
Group labels for the samples used while splitting the dataset into train/test set. |
opts.y? |
ArrayLike |
The target variable for supervised learning problems. |
Promise
<ArrayLike
>
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:214
boolean
=false
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:23
boolean
=false
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:22
PythonBridge
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:21
string
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:18
any
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:19
py(): PythonBridge;
PythonBridge
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:49
py(pythonBridge: PythonBridge): void;
Name | Type |
---|---|
pythonBridge |
PythonBridge |
void
Defined in: generated/model_selection/RepeatedStratifiedKFold.ts:53