From 0ba5282735199b6bff58b14eafa426236d546bfb Mon Sep 17 00:00:00 2001 From: 40b967d450cc73a5ec8d086a42cb7ff3 Date: Wed, 3 Nov 2021 09:44:27 +0100 Subject: [PATCH] exo5_python_fr.org: Fix sm.GLM for python3, fix hypothesis --- module2/exo5/exo5_python_fr.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module2/exo5/exo5_python_fr.org b/module2/exo5/exo5_python_fr.org index afff5e0..24f35ab 100644 --- a/module2/exo5/exo5_python_fr.org +++ b/module2/exo5/exo5_python_fr.org @@ -80,8 +80,8 @@ dysfonctionnements, nous nous concentrons sur les expériences où au moins un joint a été défectueux. #+begin_src python :results value :session *python* :exports both -data = data[data.Malfunction>0] -data +#data = data[data.Malfunction>0] +#data #+end_src #+RESULTS: @@ -136,7 +136,7 @@ data["Intercept"]=1 # logit_model=sm.Logit(data["Frequency"],data[["Intercept","Temperature"]]).fit() -logmodel=sm.GLM(data['Frequency'], data[['Intercept','Temperature']], family=sm.families.Binomial(sm.families.links.logit)).fit() +logmodel=sm.GLM(data['Frequency'], data[['Intercept','Temperature']], family=sm.families.Binomial(sm.families.links.logit())).fit() logmodel.summary() #+end_src -- 2.18.1