pysmatch.modeling

pysmatch.modeling.fit_model(index: int, X: DataFrame, y: Series, model_type: str, balance: bool, max_iter: int = 100, random_state: int = 42, balance_strategy: Literal['over', 'under'] = 'over') Dict[str, Any][source]

Fit a single propensity-score model and evaluate it on a held-out split.

Returns a fitted pipeline and validation-set accuracy.

pysmatch.modeling.optuna_tuner(X: DataFrame, y: Series, model_type: str, n_trials: int = 10, balance: bool = True, random_state: int = 42, balance_strategy: Literal['over', 'under'] = 'over') Dict[str, Any][source]

Run Optuna tuning and return the best fitted pipeline and score.