Closed simonprovost closed 2 years ago
Thanks for reporting @simonprovost, will take a look at this in a few days ;-)
Sorry for the late response @simonprovost, to use cross validation with deep forest, I think that you should declare your deep forest model inside the loop. Simply calling the fit
method several times inside the loop is essentially refitting the model, which is a functionality not supported yet.
Closed due to inactivity
@xuyxu No worries; I apologise for the delayed response. We were able to independently do cross validation by combining it into a background loop and averaging the results. It worked effectively. Hopefully, the DF will include this feature in the near future; Otherwise, I will submit a pull request as soon as feasible during the year/next year.
Cheers !
Let me know if you need any help, thanks ;-)
Hi guys,
I would like to use the following code to conduct my deep forest configuration (i.e., with my custom base estimators) within a k-fold cross validation process:
Note: The model here has been declared it is the CascadeClassifier.
However, on the second loop, I received the following error: 'RuntimeError: Layer with the key layer 0 already exists in the internal container.' This is due to the fact that the classifier is not reinstantiated, which results in a conflation with some self variables I imagine. My current patch is to reinstantiate the deep forest classifier at the beginning of my loop, however I am not sure if this is appropriate. Do you have another suggestion?
The following is the traceback:
Any help would be so grateful, Thank you all the best Best wishes;