Introductie tot regressie met statsmodels in Python
Maarten Van den Broeck
Content Developer at DataCamp
De y-waarde wanneer x nul is.
Hoeveel de y-waarde toeneemt als je x met één verhoogt.
$y = \text{intercept} + \text{helling} * x$







from statsmodels.formula.api import olsmdl_payment_vs_claims = ols("total_payment_sek ~ n_claims", data=swedish_motor_insurance)mdl_payment_vs_claims = mdl_payment_vs_claims.fit()print(mdl_payment_vs_claims.params)
Intercept 19.994486
n_claims 3.413824
dtype: float64
Intercept 19.994486
n_claims 3.413824
dtype: float64
$\text{total\_payment\_sek} = 19.99 + 3.41 * \text{n\_claims}$
Introductie tot regressie met statsmodels in Python