FLAML
FLAML copied to clipboard
Where can I get the corresponding model for each cross validation
trafficstars
Hello. I need to obtain the training and test data corresponding to each grouping in cross validation, as well as the corresponding trained model, for subsequent analysis. How can I get this?
kf = KFold(n_splits=5, shuffle=True, random_state=42)
model = RandomForestClassifier()
for fold, (train_index, test_index) in enumerate(kf.split(X)):
model.fit(X_train, y_train)
With the use of a code snippet similar to the above you can use resolve your issue... Let me know if there is an issue :) Best regards, Ranuga