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

Scoring new data #5

Open
supreetr opened this issue Sep 12, 2018 · 2 comments
Open

Scoring new data #5

supreetr opened this issue Sep 12, 2018 · 2 comments

Comments

@supreetr
Copy link

I am trying to use a previously estimated model to score new data. Is there an equivalent of sklearn's predict function in Larch?
Any help is much appreciated.

@nortelli
Copy link

nortelli commented Jan 15, 2019

Hello,
I faced the same issue some time ago. As I could not find any built-in function that would do that, I figured out the following with the existing functions:
– estimate model m on the train data;
– run m.unprovision() to be able to change the data linked to m;
– change the data linked to m using _change_data_fountain(df), where df is your new data;
– run m.setUp().
After that, you should be able to get what you want by running m.loglike() or m.probability()! It looks kind of unnecessarily complex, but it does work in my case. Hope this helps!

@jpn--
Copy link
Owner

jpn-- commented Jan 15, 2019

As you might notice from the source code here, I am also in the process of bringing Larch version 5 online, which provides explicit compatibility directly with fit and predict interface of sklearn. An example will be posted soon(-ish).

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

3 participants