You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I was playing (as most of mytime) with your awesome library, and I was wondering I that possible and a good idea to have a constant property to get the number of features a model was fit for, irrespective of the model?
Here is an example, sometimes I use Pipeline using PCA reduction and SVM with coefficients for wanted explained variance, but here I get a multiple possible output size that depend of my input data.
I like to produce report that detail whats happening in pipe: so I designed a function like that return these property base on wich kind of model. But it need to be done for each type of existing model.
def __number_of_features(model):
if isinstance(model, Pipeline):
model = model.steps[-1][1]
if isinstance(model, SVC):
return model.coef_.shape[1]
return 0
Just an idea I got in mind, and to blocking.
Feel free to decide if it's relevant or not.
The text was updated successfully, but these errors were encountered:
Hi everyone,
I was playing (as most of mytime) with your awesome library, and I was wondering I that possible and a good idea to have a constant property to get the number of features a model was fit for, irrespective of the model?
Here is an example, sometimes I use Pipeline using PCA reduction and SVM with coefficients for wanted explained variance, but here I get a multiple possible output size that depend of my input data.
I like to produce report that detail whats happening in pipe: so I designed a function like that return these property base on wich kind of model. But it need to be done for each type of existing model.
Just an idea I got in mind, and to blocking.
Feel free to decide if it's relevant or not.
The text was updated successfully, but these errors were encountered: