xlearn icon indicating copy to clipboard operation
xlearn copied to clipboard

Is there a more detailed sklearn api?

Open Skyexu opened this issue 4 years ago • 2 comments

I can't find some function like fm.disableNorm() or .cv() in sklearn api,
does it work ,when set fold below?

fm_regressor = xl.FMModel(task='reg', metric='rmse', epoch=500, k=4, stop_window=10, lr=0.0001, reg_lambda=0.01,fold=5)

thank u

Skyexu avatar Sep 26 '19 11:09 Skyexu

Hey @Skyexu, there's a parameter in the fit method for disableNorm and other options.

model.fit(X, y, is_instance_norm=False)

https://github.com/aksnzhy/xlearn/blob/e03f08ab22779ce13d9b08ac895ef5ba18fb16ef/python-package/xlearn/_sklearn.py#L187-L189

There doesn't appear to be a cv method.

Edit: You can reference the underlying model with model._XLearnModel.cv(...), but I imagine this could break between versions.

ankane avatar Aug 19 '20 10:08 ankane

@ankane ok thank u 😁

Skyexu avatar Aug 21 '20 02:08 Skyexu