Skip to content

Design: register a transform in fit for results #2373

Open

Description

@josef-pkt

Just an idea, I don't know yet whether this is feasible.

use case:
In penalized estimation, the penalization is often calibrated or predefined for standardized coefficients, standardized data (rescaled exog).

If the user uses a transformation prior to creating the model, then it might still be of interest to have the results, tests and reports for the original scale. That is we fit in one parameterization or scaling and have the Results using a different one.

This is a generalization of fit_constrained and fit_transformed that allows user to use only the second half of the transformation.

Problem with this:

While it is easy to transform params and cov_params, there are many results that directly depend on the attached exog, like fittedvalues, resid, rsquared and similar. The attached exog would have the wrong scaling, if the user rescaled it.

fit_constrained and fit_transformed use an auxiliary model that contains the transformed data, but still has the original data in the main model.

(Doesn't sound good anymore.)

correction

If only exog is transformed but not endog, then fittedvalues and resid would still be independent of linear or affine transformation of exog.
Predict, Margins and others would depend on the original scaling.

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