diff --git a/module3/exo3/exercice_python_fr.org b/module3/exo3/exercice_python_fr.org index 3379b50838bf66b13540860e5df65f2b1f3ec0c6..2d4fe8d8c6f353c96b3985ef02324c691a98640c 100644 --- a/module3/exo3/exercice_python_fr.org +++ b/module3/exo3/exercice_python_fr.org @@ -574,7 +574,7 @@ fig.savefig('stacko_g1500_reglineaireT-f(S).png') #+RESULTS: : None -#+BEGIN_SRC python :session :results output :exports both +#+BEGIN_SRC python :session :results replace :exports both from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error S_tt = [[value] for value in S_g1500] @@ -584,14 +584,8 @@ my_t = np.array(T_g1500) lmodel = LinearRegression() lmodel.fit(my_s, my_t) f"Les coeff sont L = {lmodel.intercept_} et C = { 1 / lmodel.coef_}" - #+END_SRC #+RESULTS: -: Traceback (most recent call last): -: File "", line 1, in -: File "/var/folders/gg/nbr_dzs57lq4z877d6xndp5w0000gn/T/babel-ppt7An/python-CQJzRz", line 9 -: return (f"Les coeff sont L = {lmodel.intercept_} et C = { 1 / lmodel.coef_}") -: ^ -: SyntaxError: 'return' outside function +: Les coeff sont L = 120.04921279789215 et C = [-555.38712112] Etonnant pour C négatif alors que l'analyse graphique montre une pente positivew