Skip to content

ENH generic category: predict analogue that takes also endog #7971

Open

Description

@josef-pkt

I'm thinking of a more general method to compute statistics, either in or out of sample, that depend on endog also.
Sinilar to predict but with additional endog as argument.

Insample this could be a general method with "which" similar to the attributes, like resid that we have.
Out of sample it would be evaluation measures, e.g. evaluate new observations for outlyingness.

related, special cases
#7947 out of sample loglike, eval_measures
#7919 get_resid

The case I'm currently thinking of is which="cdf" but evaluated for given endog, while which="prob" in predict computes for a set of endog independent of observation.
use cases for in sample diagnostic, and out of sample performance evaluation

This would be like an observation specific "pvalue" for an outlier test for distribution that don't have a residual representation like gaussian/normal model.

The advantage of a general method is that we can add additional "which" over time without needed new model specific results attributes, similar to the new pattern in predict/get_prediction.

Activity

  1. added this to the 0.14 milestone on Dec 21, 2021
  2. josef-pkt commented on Dec 21, 2021

    @josef-pkt
    MemberAuthor

    I have no idea yet what would be a good name for that method.

  3. josef-pkt commented on Mar 21, 2022

    @josef-pkt
    MemberAuthor

    we actually are already partway there with y_values for predicted pmf in count models.
    The original intention of that was to get the entire predictive distribution where y_values = np.arage(y_max)
    but it should also work to evaluate it at one y_value that corresponds to endog of a new observation.

    what I want is cdf(y_new | x_new) as PIT for new observations
    e.g. for ranking or finding outlyingness of a (new) observation

    context: I'm currently browsing literature for regression adjusted control charts, e.g. based on residual, or predictive distribution
    in context of prediction and tolerance intervals for one sample poisson #8166

  4. josef-pkt commented on Oct 11, 2023

    @josef-pkt
    MemberAuthor

    I don't find the issue for out-of-sample R2, rsquared

    new reference:
    Hawinkel, Stijn, Willem Waegeman, and Steven Maere. “Out-of-Sample R2: Estimation and Inference.” The American Statistician 0, no. 0 (2023): 1–11. https://doi.org/10.1080/00031305.2023.2216252.

    found while looking for (pseudo) R2 measures for GLM #9025

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions