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')
#+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 "<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
: Les coeff sont L = 120.04921279789215 et C = [-555.38712112]
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