Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use minirocket in production #29

Open
ramdhan1989 opened this issue Mar 30, 2024 · 1 comment
Open

how to use minirocket in production #29

ramdhan1989 opened this issue Mar 30, 2024 · 1 comment

Comments

@ramdhan1989
Copy link

Hi,
I would like to ask, how to use minirocket for production or implementation phase. is there any way to save minirocket that was fitted in training data and use it for new dataset?

thank you

@angus924
Copy link
Owner

Hi @ramdhan1989, thanks for your question, sorry for the slow response.

This could make sense if the new dataset is drawn from more or less the same distribution as the old dataset.

In any case, what you would need to do is: (a) store the parameters generated by fit(...); and (b) store the ridge regression model.

The parameters are a tuple of three numpy arrays. You could use pickle on the tuple, or you could use numpy save / numpy savez to store the arrays via numpy.

In terms of the ridge regression model, I believe you can pickle the fitted model, or there are a couple of other options for storing the model: https://scikit-learn.org/stable/model_persistence.html. Another option which is a bit more convoluted would be to extract the learned parameters etc from the model, save these, and then assign them to a new classifier instance when loading.

I hope that helps a bit.

Let me know if you have any other questions.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants