Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qbe
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
lifo
A
Anaïs Halftermeyer
queryByExample
qbe
Commits
6d69d04b
Commit
6d69d04b
authored
Aug 22, 2025
by
Elias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tool: Internal metrics plots
parent
b1ba5891
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
README.md
README.md
+6
-0
internal_metrics_in_graphical_form.py
internal_metrics_in_graphical_form.py
+37
-0
No files found.
README.md
View file @
6d69d04b
...
@@ -87,3 +87,9 @@ python3 hierarchiqueAvecDerniereDistance.py \
...
@@ -87,3 +87,9 @@ python3 hierarchiqueAvecDerniereDistance.py \
```
bash
```
bash
python3 count_nb_segments.py /path/to/your/segments
python3 count_nb_segments.py /path/to/your/segments
```
```
### • Internal metrics plots (wcss, silhouette and davies-bouldin)
```
bash
python3 internal_metrics_in_graphical_form.py
```
internal_metrics_in_graphical_form.py
0 → 100644
View file @
6d69d04b
import
matplotlib.pyplot
as
plt
# Données
k
=
[
100
,
150
,
200
,
250
,
300
,
350
,
400
,
450
,
500
,
550
,
600
,
650
]
wcss
=
[
7011484.50
,
6806317.50
,
6659663.00
,
6556700.50
,
6464688.50
,
6391583.00
,
6328672.50
,
6281429.00
,
6216793.50
,
6178428.00
,
6137612.00
,
6107232.50
]
silhouette
=
[
-
0.0106
,
-
0.0147
,
-
0.0243
,
-
0.0299
,
-
0.0370
,
-
0.0406
,
-
0.0459
,
-
0.0427
,
-
0.0562
,
-
0.0531
,
-
0.0522
,
-
0.0666
]
davies
=
[
4.6826
,
4.6141
,
4.4273
,
4.3083
,
4.2020
,
4.1403
,
4.1319
,
4.0021
,
3.9148
,
3.8587
,
3.8543
,
3.7699
]
plt
.
figure
(
figsize
=
(
14
,
5
))
# WCSS
plt
.
subplot
(
1
,
3
,
1
)
plt
.
plot
(
k
,
wcss
,
marker
=
'o'
)
plt
.
title
(
"WCSS vs k"
)
plt
.
xlabel
(
"Nombre de clusters (k)"
)
plt
.
ylabel
(
"WCSS"
)
plt
.
grid
(
True
)
# Silhouette
plt
.
subplot
(
1
,
3
,
2
)
plt
.
plot
(
k
,
silhouette
,
marker
=
'o'
,
color
=
'orange'
)
plt
.
title
(
"Silhouette vs k"
)
plt
.
xlabel
(
"Nombre de clusters (k)"
)
plt
.
ylabel
(
"Score silhouette"
)
plt
.
grid
(
True
)
# Davies-Bouldin
plt
.
subplot
(
1
,
3
,
3
)
plt
.
plot
(
k
,
davies
,
marker
=
'o'
,
color
=
'green'
)
plt
.
title
(
"Davies-Bouldin vs k"
)
plt
.
xlabel
(
"Nombre de clusters (k)"
)
plt
.
ylabel
(
"Indice Davies-Bouldin"
)
plt
.
grid
(
True
)
plt
.
tight_layout
()
plt
.
show
()
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