Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
006b4500d188491bec31dcfa180916c2
mooc-rr
Commits
a4f07dc9
Commit
a4f07dc9
authored
Jun 07, 2020
by
Samuel MEYNARD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Affichage résultat stacko > MTU cas regression linéaire
parent
aca8ec47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
exercice_python_fr.org
module3/exo3/exercice_python_fr.org
+2
-8
No files found.
module3/exo3/exercice_python_fr.org
View file @
a4f07dc9
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment