Commit a4f07dc9 authored by Samuel MEYNARD's avatar Samuel MEYNARD

Affichage résultat stacko > MTU cas regression linéaire

parent aca8ec47
...@@ -574,7 +574,7 @@ fig.savefig('stacko_g1500_reglineaireT-f(S).png') ...@@ -574,7 +574,7 @@ fig.savefig('stacko_g1500_reglineaireT-f(S).png')
#+RESULTS: #+RESULTS:
: None : 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.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_squared_error
S_tt = [[value] for value in S_g1500] S_tt = [[value] for value in S_g1500]
...@@ -584,14 +584,8 @@ my_t = np.array(T_g1500) ...@@ -584,14 +584,8 @@ my_t = np.array(T_g1500)
lmodel = LinearRegression() lmodel = LinearRegression()
lmodel.fit(my_s, my_t) lmodel.fit(my_s, my_t)
f"Les coeff sont L = {lmodel.intercept_} et C = { 1 / lmodel.coef_}" f"Les coeff sont L = {lmodel.intercept_} et C = { 1 / lmodel.coef_}"
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
: Traceback (most recent call last): : Les coeff sont L = 120.04921279789215 et C = [-555.38712112]
: File "<stdin>", line 1, in <module>
: 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
Etonnant pour C négatif alors que l'analyse graphique montre une pente positivew Etonnant pour C négatif alors que l'analyse graphique montre une pente positivew
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment