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
5df14c66
Commit
5df14c66
authored
Jan 27, 2023
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Umbenennen in activation_function_2
parent
e880a33e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
main.py
main.py
+2
-2
config.yaml
ressources/config/config.yaml
+1
-1
configKNN.py
src/knn/configKNN.py
+4
-4
defineKNN.py
src/knn/defineKNN.py
+1
-1
createExcelFile.py
src/result/createExcelFile.py
+2
-2
No files found.
main.py
View file @
5df14c66
...
...
@@ -24,7 +24,7 @@ def run_cross_validation():
if
optimization_method
.
name
in
config
[
'knn'
][
'exception_optimization_method'
]:
continue
for
activation_function_2
in
Aktivierungsfunktion
:
if
activation_function_2
.
name
in
config
[
'knn'
][
'exception_activation_funktion_
1
'
]:
if
activation_function_2
.
name
in
config
[
'knn'
][
'exception_activation_funktion_
2
'
]:
continue
for
activation_function_128
in
Aktivierungsfunktion
:
if
check_if_kombination_is_not_allowed
(
...
...
@@ -38,7 +38,7 @@ def run_cross_validation():
r
=
1
config_knn
=
ConfigKNN
(
excluded_folder
=
Markt
.
Kein_Markt
,
activation_function_
1
_units
=
activation_function_2
,
activation_function_
2
_units
=
activation_function_2
,
activation_function_128_units
=
activation_function_128
,
optimization_method
=
optimization_method
)
...
...
ressources/config/config.yaml
View file @
5df14c66
...
...
@@ -7,7 +7,7 @@ knn:
epochs
:
10
exception_optimization_method
:
[
'
SGD'
]
exception_activation_funktion_
1
:
exception_activation_funktion_
2
:
[
'
ReLU'
]
ignoreKnnCombinations
:
[
...
...
src/knn/configKNN.py
View file @
5df14c66
...
...
@@ -7,16 +7,16 @@ class ConfigKNN:
def
__init__
(
self
,
excluded_folder
=
Markt
.
Kein_Markt
,
activation_function_128_units
=
Aktivierungsfunktion
.
ReLU
,
activation_function_
1
_units
=
Aktivierungsfunktion
.
sigmoid
,
activation_function_
2
_units
=
Aktivierungsfunktion
.
sigmoid
,
optimization_method
=
Optimierungsverfahren
.
SGD
):
self
.
excluded_folder
=
excluded_folder
self
.
activation_function_128_units
=
activation_function_128_units
self
.
activation_function_
1_units
=
activation_function_1
_units
self
.
activation_function_
2_units
=
activation_function_2
_units
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
.
activation_function_128_units
.
name
+
' - activation_function_
2
_units: '
\
+
self
.
activation_function_
2
_units
.
name
+
' - excluded_folder: '
\
+
self
.
excluded_folder
.
name
src/knn/defineKNN.py
View file @
5df14c66
...
...
@@ -14,7 +14,7 @@ def define_model(config_knn):
# Die Fully-Connected-Schichten werden definiert
flat
=
tf
.
keras
.
layers
.
Flatten
()(
model
.
layers
[
-
1
]
.
output
)
output_layer_1
=
get_next_layer
(
128
,
config_knn
.
activation_function_128_units
,
flat
)
output_layer_2
=
get_next_layer
(
2
,
config_knn
.
activation_function_
1
_units
,
output_layer_1
)
output_layer_2
=
get_next_layer
(
2
,
config_knn
.
activation_function_
2
_units
,
output_layer_1
)
# Die Schichten des Modells werden definiert
model
=
tf
.
keras
.
models
.
Model
(
inputs
=
model
.
inputs
,
outputs
=
output_layer_2
)
...
...
src/result/createExcelFile.py
View file @
5df14c66
...
...
@@ -25,7 +25,7 @@ def create_excel_result(worksheet, r, callback, config, config_knn, evaluate_met
r
=
r
+
1
worksheet
.
cell
(
row
=
r
,
column
=
2
)
.
value
=
config_knn
.
optimization_method
.
name
worksheet
.
cell
(
row
=
r
,
column
=
3
)
.
value
=
config_knn
.
activation_function_128_units
.
name
worksheet
.
cell
(
row
=
r
,
column
=
4
)
.
value
=
config_knn
.
activation_function_
1
_units
.
name
worksheet
.
cell
(
row
=
r
,
column
=
4
)
.
value
=
config_knn
.
activation_function_
2
_units
.
name
worksheet
.
cell
(
row
=
r
,
column
=
5
)
.
value
=
config_knn
.
excluded_folder
.
name
r
=
r
+
2
...
...
@@ -148,7 +148,7 @@ def save_excel(workbook, config, config_knn):
now
=
datetime
.
now
()
date_time
=
now
.
strftime
(
"
%
d_
%
m_
%
y__
%
H_
%
M"
)
file_name
=
config_knn
.
optimization_method
.
name
+
"_"
+
\
config_knn
.
activation_function_
1
_units
.
name
+
"_"
+
\
config_knn
.
activation_function_
2
_units
.
name
+
"_"
+
\
config_knn
.
activation_function_128_units
.
name
+
"_"
+
date_time
+
".xlsx"
# Speichern Sie die Arbeitsmappe
workbook
.
save
(
config
[
"result"
][
"excel_path"
]
+
file_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