predict-idlab / powershap

A power-full Shapley feature selection method.
Other
196 stars 19 forks source link

Custom CV #14

Closed jmrichardson closed 2 years ago

jmrichardson commented 2 years ago

Hi,

Thank you for this great library!

My data is time series (ordinal) and would like to provide my own cv iterator such as:

cv = GapKFold(n_splits=3, gap_before=self.gap_before, gap_after=self.gap_after)

Would like to do the following?

selector = PowerShap(model=CatBoostClassifier(n_estimators=250, verbose=0, use_best_model=True), verbose=True)
selector.fit(X, y, cv=cv)

It appears from cursory look at the code that the data is split using a train_test_split which shuffles the data. I was hoping to be able to either provide a custom cv or be able to set the shuffle=False parameter?

Thanks for your consideration

jmrichardson commented 2 years ago

Thank you #17 resolving this issue! :)