innovate.FitResult
All current Python definitions
View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
Signature
Section titled “Signature”@dataclass(frozen=True)class FitResult: model: str envelope: dict[str, Any]Keep the native fit envelope and expose parameters and reusable state.
Instances prevent attribute reassignment, but the supplied envelope remains a
mutable nested dictionary. Parameter and diagnostic accessors return shallow
copies. Constructor options in the envelope are reused by predict.
Point estimates and convergence diagnostics do not establish calibrated
uncertainty, identifiability or suitability for a scientific application.
Attributes
Section titled “Attributes”model: Native model key used to generate predictions from this fit.envelope: Complete successful native fitting response, including the result’s parameters, diagnostics and stored constructor state.
categorize_adopters
Section titled “categorize_adopters”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
def categorize_adopters(self, data: pl.DataFrame | pl.LazyFrame) -> pl.DataFrame: ...Predict a scalar rate series and assign historical adopter categories.
Parameters
Section titled “Parameters”data: Polars time grid satisfying this fit’s prediction contract. The model must produce one finite, nonnegativerateseries.
Returns
Section titled “Returns”Input columns, predicted rate and a category string column.
Categories depend on the supplied grid’s sample-weighted rate mass,
not individual-level adoption histories.
Raises
Section titled “Raises”ValueError: If scalar rates are unavailable, negative or have zero total mass, or input/output columns violate the native contract.KeyError: If the fit envelope lacks required prediction state.TypeError: If data or stored options cannot cross the native boundary.polars.exceptions.PolarsError: If table processing or IPC fails.
diagnostics
Section titled “diagnostics”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
@propertydef diagnostics(self) -> dict[str, Any]: ...Read the diagnostic fields supplied by the native fitting operation.
Returns
Section titled “Returns”Shallow copy of diagnostics such as objective or convergence evidence; available fields depend on the model and fitting operation.
Raises
Section titled “Raises”KeyError: If the envelope lacks a result or diagnostics mapping.TypeError: If the diagnostics cannot be converted to a dictionary.
event_profile
Section titled “event_profile”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
@propertydef event_profile(self) -> dict[str, Any] | None: ...Read candidate scores and convergence for a profiled event fit.
Returns
Section titled “Returns”Shallow copy of event_profile, or None when the native result
contains no such profile. Scores are not calibrated confidence bounds.
Raises
Section titled “Raises”KeyError: If the envelope lacks its result mapping.TypeError: If a present profile cannot be converted to a dictionary.
joint_time_profile
Section titled “joint_time_profile”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
@propertydef joint_time_profile(self) -> dict[str, Any] | None: ...Read native candidate scores for a joint launch-and-event fit.
Returns
Section titled “Returns”Shallow copy of joint_time_profile or None when the fit did
not return one. The accessor does not recompute the candidate search.
Raises
Section titled “Raises”KeyError: If the envelope lacks its result mapping.TypeError: If a present profile cannot be converted to a dictionary.
launch_profile
Section titled “launch_profile”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
@propertydef launch_profile(self) -> dict[str, Any] | None: ...Read candidate scores for a profiled generation-launch fit.
Returns
Section titled “Returns”Shallow copy of launch_profile or None when it is absent.
The profile retains the native candidate evaluation structure.
Raises
Section titled “Raises”KeyError: If the envelope lacks its result mapping.TypeError: If a present profile cannot be converted to a dictionary.
parameters
Section titled “parameters”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
@propertydef parameters(self) -> dict[str, float]: ...Read fitted parameter estimates without exposing the original mapping.
Returns
Section titled “Returns”Shallow copy of the native result’s parameter-name/value mapping.
Raises
Section titled “Raises”KeyError: If a manually constructed or mutated envelope lacks the result or parameters mapping.TypeError: If that mapping cannot be converted to a dictionary.
predict
Section titled “predict”View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4
def predict( self, data: pl.DataFrame | pl.LazyFrame, *, quantity: str = 'level', covariate_rate_columns: dict[str, str] | None = None,) -> pl.DataFrame: ...Predict with fitted parameters and the stored constructor options.
Parameters
Section titled “Parameters”data: Polars frame with a nonempty, finite, strictly increasing numerictimecolumn and all covariates required by this fit. Lazy input is collected and transported through copying IPC.quantity:"level"by default, or"rate"when supported by the model. Signed rates should not be interpreted as gross incidence.covariate_rate_columns: Optional map from declared Logistic controls to derivative columns, used only for covariate-aware rate output.
Returns
Section titled “Returns”Input columns and native prediction columns in the original row order,
using the naming and shape contract of the module-level predict.
Raises
Section titled “Raises”KeyError: If the stored envelope lacks parameters or constructor state.ValueError: If the native prediction, grid, options or output names violate the prediction contract.TypeError: If data or serializable options have unsupported types.polars.exceptions.PolarsError: If collection or IPC conversion fails.