Skip to content

Commit aea6cf1

Browse files
authored
Specified random state
1 parent f9dd545 commit aea6cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ We have seen how PCA can improve both the runtime and the results of our trainin
105105

106106
Implement the `gs_pca` function, which utilizes a grid search approach to determine the most suitable number of PCA components for feature dimensionality reduction before the training:
107107

108-
20. Define the outer k-fold cross-validation strategy with 5 folds using `KFold` from `sklearn.model_selection`.
108+
20. Define the outer k-fold cross-validation strategy with 5 folds using `KFold` from `sklearn.model_selection`. Set `random_state = 42`.
109109
21. Next, initialize the variables to keep track of the best mean accuracy score and the corresponding number of PCA components found 22. Iterate through the specified list of PCA component values.
110110

111111
22.1. Create an outer 5-fold cross-validation loop, iterating through the 5 splits while obtaining the training and testing indices for each split.

0 commit comments

Comments
 (0)