cca_zoo icon indicating copy to clipboard operation
cca_zoo copied to clipboard

cca_zoo.model_selection.GridSearchCV's param_grid parameter should accept any type of iterator

Open JohannesWiesner opened this issue 2 years ago • 3 comments

With reference to this comment, cca_zoo.model_selection.GridSearchCV's param_grid parameter should accept any type of iterator as dictionary values. Right now, np.array, pd.Series, list and tuple come to my mind. Both np.array and pd.Series can be easily converted into the list type by using their tolist() method (or by calling list() on them). Not sure about other data types. I guess, generally, any object that has the __iter__ and __next__ methods should be fine if it can be converted to a list?

JohannesWiesner avatar Aug 01 '23 12:08 JohannesWiesner

P.S.: Cannot recall that I had this issue with scikit-learn's GridSearchCV before. How do they handle this case?

JohannesWiesner avatar Aug 01 '23 15:08 JohannesWiesner

Fixed this in latest push to main

jameschapman19 avatar Aug 02 '23 13:08 jameschapman19

Small fix to work with #175

jameschapman19 avatar Aug 02 '23 14:08 jameschapman19