Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Evaluation künstlicher neuronaler Netze für eine OOS-Erkennung
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Evaluation künstlicher neuronaler Netze für eine OOS-Erkennung
Commits
0d762cde
Commit
0d762cde
authored
Jan 20, 2023
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mehr Printausgaben - Alle Märkte wieder einbezogen
parent
e982cd2d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
16 deletions
+18
-16
main.py
main.py
+1
-7
config.yaml
ressources/config/config.yaml
+3
-3
marktEnum.py
src/enum/marktEnum.py
+4
-4
configKNN.py
src/knn/configKNN.py
+10
-2
No files found.
main.py
View file @
0d762cde
...
@@ -40,6 +40,7 @@ def run_cross_validation():
...
@@ -40,6 +40,7 @@ def run_cross_validation():
if
excluded_folder
==
Markt
.
Kein_Markt
:
if
excluded_folder
==
Markt
.
Kein_Markt
:
continue
continue
config_knn
.
excluded_folder
=
excluded_folder
config_knn
.
excluded_folder
=
excluded_folder
print
(
"Konfiguration KNN: "
+
config_knn
.
__str__
())
worksheet
,
r
,
evaluate_metrics
,
training_duration_model
=
run_model
(
config
,
config_knn
,
worksheet
,
r
)
worksheet
,
r
,
evaluate_metrics
,
training_duration_model
=
run_model
(
config
,
config_knn
,
worksheet
,
r
)
model_evaluate_metrics
.
append
(
evaluate_metrics
)
model_evaluate_metrics
.
append
(
evaluate_metrics
)
training_duration_models
.
append
(
training_duration_model
)
training_duration_models
.
append
(
training_duration_model
)
...
@@ -48,13 +49,6 @@ def run_cross_validation():
...
@@ -48,13 +49,6 @@ def run_cross_validation():
print
(
"Speichere die Excel Tabelle"
)
print
(
"Speichere die Excel Tabelle"
)
save_excel
(
workbook
,
config
,
config_knn
)
save_excel
(
workbook
,
config
,
config_knn
)
# config_knn = ConfigKNN(
# excluded_folder=Markt.Markt_C,
# activation_function_1_units=Aktivierungsfunktion.sigmoid,
# activation_function_128_units=Aktivierungsfunktion.ReLU,
# optimization_method=Optimierungsverfahren.SGD
# )
# run a model definition
# run a model definition
def
run_model
(
config
,
config_knn
,
worksheet
,
r
):
def
run_model
(
config
,
config_knn
,
worksheet
,
r
):
...
...
ressources/config/config.yaml
View file @
0d762cde
bilder
:
bilder
:
original_path
:
"
assets/Bilder/Datengrundlage-Reduziert-Test/"
#
original_path: "assets/Bilder/Datengrundlage-Reduziert-Test/"
#
original_path: "assets/Bilder/Datengrundlage/"
original_path
:
"
assets/Bilder/Datengrundlage/"
knn_path
:
"
assets/Bilder/AktuelleTrainingsUndTestdaten/"
knn_path
:
"
assets/Bilder/AktuelleTrainingsUndTestdaten/"
knn
:
knn
:
epochs
:
2
epochs
:
10
result
:
result
:
plot_path
:
"
ressources/results/plot/"
plot_path
:
"
ressources/results/plot/"
excel_path
:
"
ressources/results/excel/"
excel_path
:
"
ressources/results/excel/"
src/enum/marktEnum.py
View file @
0d762cde
...
@@ -4,8 +4,8 @@ from enum import Enum
...
@@ -4,8 +4,8 @@ from enum import Enum
class
Markt
(
Enum
):
class
Markt
(
Enum
):
Markt_A
=
0
,
Markt_A
=
0
,
Markt_B
=
1
,
Markt_B
=
1
,
#
Markt_C = 2,
Markt_C
=
2
,
#
Markt_D = 3,
Markt_D
=
3
,
#
Markt_E = 4,
Markt_E
=
4
,
#
Markt_F = 5
Markt_F
=
5
Kein_Markt
=
-
1
Kein_Markt
=
-
1
src/knn/configKNN.py
View file @
0d762cde
from
src.enum.activierungsfunktionEnum
import
Aktivierungsfunktion
from
src.enum.activierungsfunktionEnum
import
Aktivierungsfunktion
from
src.enum.marktEnum
import
Markt
from
src.enum.optimierungsverfahren
import
Optimierungsverfahren
from
src.enum.optimierungsverfahren
import
Optimierungsverfahren
class
ConfigKNN
:
class
ConfigKNN
:
def
__init__
(
self
,
def
__init__
(
self
,
excluded_folder
=
None
,
excluded_folder
=
Markt
.
Kein_Markt
,
activation_function_128_units
=
Aktivierungsfunktion
.
ReLU
,
activation_function_128_units
=
Aktivierungsfunktion
.
ReLU
,
activation_function_1_units
=
Aktivierungsfunktion
.
ReLU
,
activation_function_1_units
=
Aktivierungsfunktion
.
sigmoid
,
optimization_method
=
Optimierungsverfahren
.
SGD
):
optimization_method
=
Optimierungsverfahren
.
SGD
):
self
.
excluded_folder
=
excluded_folder
self
.
excluded_folder
=
excluded_folder
self
.
activation_function_128_units
=
activation_function_128_units
self
.
activation_function_128_units
=
activation_function_128_units
self
.
activation_function_1_units
=
activation_function_1_units
self
.
activation_function_1_units
=
activation_function_1_units
self
.
optimization_method
=
optimization_method
self
.
optimization_method
=
optimization_method
def
__str__
(
self
):
return
"optimization_method: "
\
+
self
.
optimization_method
.
name
+
" - activation_function_128_units: "
\
+
self
.
activation_function_128_units
.
name
+
' - activation_function_1_units: '
\
+
self
.
activation_function_1_units
.
name
+
' - excluded_folder: '
\
+
self
.
excluded_folder
.
name
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