Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Decision Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vincent.steinman
Decision Tree
Commits
faded250
Commit
faded250
authored
1 year ago
by
vincent.steinman
Browse files
Options
Downloads
Patches
Plain Diff
add stuff
parent
c3da7684
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cours06 - Apprentissage supervisé AD.pdf
+0
-0
0 additions, 0 deletions
Cours06 - Apprentissage supervisé AD.pdf
tree.py
+10
-0
10 additions, 0 deletions
tree.py
with
10 additions
and
0 deletions
Cours06 - Apprentissage supervisé AD.pdf
0 → 100644
+
0
−
0
View file @
faded250
File added
This diff is collapsed.
Click to expand it.
tree.py
+
10
−
0
View file @
faded250
...
@@ -14,6 +14,8 @@ ETA = 0.5
...
@@ -14,6 +14,8 @@ ETA = 0.5
NBNEURON
=
10
NBNEURON
=
10
ACTIVATION
=
lambda
x
:
(
1
/
(
1
+
np
.
exp
(
-
x
)))
ACTIVATION
=
lambda
x
:
(
1
/
(
1
+
np
.
exp
(
-
x
)))
per_lst
=
[]
def
getNewWeight
(
weight
:
float
,
result
:
float
,
neuron_value
:
float
,
expected_value
:
int
)
->
float
:
def
getNewWeight
(
weight
:
float
,
result
:
float
,
neuron_value
:
float
,
expected_value
:
int
)
->
float
:
return
weight
+
ETA
*
(
expected_value
-
result
)
*
result
*
(
1
-
result
)
*
neuron_value
return
weight
+
ETA
*
(
expected_value
-
result
)
*
result
*
(
1
-
result
)
*
neuron_value
...
@@ -23,6 +25,14 @@ def getSlope(weights: list[float]) -> Tuple[float, float]:
...
@@ -23,6 +25,14 @@ def getSlope(weights: list[float]) -> Tuple[float, float]:
return
pente
,
origine
return
pente
,
origine
def
neuron
(
data
:
pd
.
DataFrame
,
weights
:
list
[
float
],
activation
):
for
i
in
range
(
NBNEURON
):
perceptron
(
data
,
weights
,
activation
)
def
gradient
():
#somme (t-o)o(1-o)x
pass
def
perceptron
(
data
:
pd
.
DataFrame
,
weights
:
list
[
float
],
activation
)
->
list
[
float
]:
def
perceptron
(
data
:
pd
.
DataFrame
,
weights
:
list
[
float
],
activation
)
->
list
[
float
]:
predicted
=
data
[
"
success
"
].
tolist
()
predicted
=
data
[
"
success
"
].
tolist
()
for
__
in
range
(
0
,
2000
):
for
__
in
range
(
0
,
2000
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment