Open
Description
I would like to use FM_FTRL
in an sklearn cross-validation pipeline, e.g.,
from wordbatch.models import FM_FTRL
modelF = FM_FTRL(
alpha=0.01, # learning rate
beta=0.1,
L1=0.00001,
L2=0.10,
D=X_train.shape[1],
alpha_fm=0.01,
L2_fm=0.0,
init_fm=0.01,
D_fm=50,
e_noise=0.0001,
iters=5,
inv_link='sigmoid',
threads=4
)
cv_scores = cross_val_score(modelF, X_train.tocsc(), y_train_fm.target.values, scoring='roc_auc', cv=time_split)
This throws
TypeError: Cannot clone object '<wordbatch.models.fm_ftrl.FM_FTRL object at 0x557056cfbfa0>' (type <class 'wordbatch.models.fm_ftrl.FM_FTRL'>): it does not seem to be a scikit-learn estimator as it does not implement a 'get_params' methods.
This error is also thrown when trying to pass a FM_FTRL model to GridSearchCV
.
Can you provide some guidance on how to make this work?
I can see in this thread that you tuned hyperparameters with random search. Can you provide guidance on that?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels