Skip to content

predict functions as standalone functions #1590

Open

Description

@josef-pkt

usecase similar to the case we discussed when we introduced clear data and pickle. estimate once, predict often (without model)

most current models outside of tsa would just need the patsy processing for data conversion and a linear or non-linear E(y|x) function

optional confidence intervals and standard errors if we have the cov_params.

can we pickle a closure, nested function created in a Resultsclass?

Activity

  1. jseabold commented on Apr 11, 2014

    @jseabold
    Member

    Similar #737.

    No, you can't pickle these using pickle I'm pretty sure. If you attach it as a method then you can. I've done this elsewhere where we have different standalone loglikelihood functions.

    We could look into using dill for the pickling.

  2. josef-pkt commented on Apr 11, 2014

    @josef-pkt
    MemberAuthor

    I just went through 3 machine learning talks by users of scikit-learn at pycon.
    Having to pickle a model for later prediction use sounds a bit inefficient.

    We also have an issue that the formula information of patsy cannot be pickled, #1263
    similar to a transform "raw data -> exog" in a pipeline. see also #987 for formulas in prediction (intervals).

  3. josef-pkt commented on Jul 27, 2015

    @josef-pkt
    MemberAuthor

    Checking some of my oldest branches, I found a version that would work for stateless predict functions based on a model or result created by __new__.
    stateless is if all information is in params,
    some models use extra information, like the decomposition of params.

    master...josef-pkt:predict_function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions