Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SHIRE
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
mbd
SHIRE
Commits
45fa240f
Commit
45fa240f
authored
4 months ago
by
Ann-Kathrin Margarete Edrich
Browse files
Options
Downloads
Patches
Plain Diff
Fix spelling mistake
parent
698fa096
No related branches found
No related tags found
No related merge requests found
Pipeline
#524810
passed
4 months ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gui_version/compatibility_of_input_datasets.py
+6
-3
6 additions, 3 deletions
src/gui_version/compatibility_of_input_datasets.py
src/plain_scripts/compatibility_of_input_datasets.py
+5
-3
5 additions, 3 deletions
src/plain_scripts/compatibility_of_input_datasets.py
with
11 additions
and
6 deletions
src/gui_version/compatibility_of_input_datasets.py
+
6
−
3
View file @
45fa240f
...
...
@@ -213,14 +213,14 @@ class comparison_training_prediction_dataset:
columns
=
self
.
pred
.
columns
# Regular expression to match "<feature>_<value>_encoded"
pattern
=
re
.
compile
(
r
"
^(.*?)(_?\d+)?_encode
d
$
"
)
pattern
=
re
.
compile
(
r
"
^(.*?)(_?\d+)?_encode$
"
)
encoded_features
=
{
pattern
.
match
(
col
).
group
(
1
)
for
col
in
columns
if
pattern
.
match
(
col
)}
self
.
logger
.
info
(
'
Identified encoded features:
'
+
str
(
encoded_features
))
count
=
0
for
feature
in
encoded_features
:
feature_cols
=
[
col
for
col
in
self
.
pred
.
columns
if
col
.
startswith
(
feature
)
and
col
.
endswith
(
"
_encode
d
"
)]
feature_cols
=
[
col
for
col
in
self
.
pred
.
columns
if
col
.
startswith
(
feature
)
and
col
.
endswith
(
"
_encode
"
)]
all_zero_rows
=
(
self
.
pred
[
feature_cols
]
==
0
).
all
(
axis
=
1
)
all_zero_rows
=
self
.
pred
.
index
[
all_zero_rows
].
tolist
()
self
.
idx
=
list
(
set
(
self
.
idx
+
all_zero_rows
))
...
...
@@ -235,6 +235,9 @@ class comparison_training_prediction_dataset:
"""
self
.
pred
=
pd
.
concat
([
self
.
xy
,
self
.
pred
],
axis
=
1
)
self
.
logger
.
info
(
'
Features in the prediction dataset:
'
+
str
(
self
.
pred
.
columns
.
tolist
()))
pred
=
self
.
pred
.
to_numpy
()
char_features
=
features_to_char
(
self
.
pred
.
columns
)
...
...
@@ -272,7 +275,7 @@ class comparison_training_prediction_dataset:
os
.
remove
(
outfile
)
self
.
train
=
pd
.
concat
([
self
.
xy_train
,
self
.
train
],
axis
=
1
)
self
.
logger
.
info
(
'
Features in the training dataset:
'
+
str
(
self
.
train
.
columns
.
tolist
()))
# Save dataframe as csv
self
.
train
.
to_csv
(
outfile
,
sep
=
'
,
'
,
index
=
False
)
self
.
logger
.
info
(
'
Training dataset saved
'
)
...
...
This diff is collapsed.
Click to expand it.
src/plain_scripts/compatibility_of_input_datasets.py
+
5
−
3
View file @
45fa240f
...
...
@@ -193,14 +193,14 @@ class comparison_training_prediction_dataset:
columns
=
self
.
pred
.
columns
# Regular expression to match "<feature>_<value>_encoded"
pattern
=
re
.
compile
(
r
"
^(.*?)(_?\d+)?_encode
d
$
"
)
pattern
=
re
.
compile
(
r
"
^(.*?)(_?\d+)?_encode$
"
)
encoded_features
=
{
pattern
.
match
(
col
).
group
(
1
)
for
col
in
columns
if
pattern
.
match
(
col
)}
print
(
encoded_features
)
self
.
logger
.
info
(
'
Identified encoded features:
'
+
str
(
encoded_features
))
count
=
0
for
feature
in
encoded_features
:
feature_cols
=
[
col
for
col
in
self
.
pred
.
columns
if
col
.
startswith
(
feature
)
and
col
.
endswith
(
"
_encode
d
"
)]
feature_cols
=
[
col
for
col
in
self
.
pred
.
columns
if
col
.
startswith
(
feature
)
and
col
.
endswith
(
"
_encode
"
)]
all_zero_rows
=
(
self
.
pred
[
feature_cols
]
==
0
).
all
(
axis
=
1
)
all_zero_rows
=
self
.
pred
.
index
[
all_zero_rows
].
tolist
()
self
.
idx
=
list
(
set
(
self
.
idx
+
all_zero_rows
))
...
...
@@ -215,6 +215,7 @@ class comparison_training_prediction_dataset:
"""
self
.
pred
=
pd
.
concat
([
self
.
xy
,
self
.
pred
],
axis
=
1
)
self
.
logger
.
info
(
'
Features in the prediction dataset:
'
+
str
(
self
.
pred
.
columns
.
tolist
()))
pred
=
self
.
pred
.
to_numpy
()
char_features
=
features_to_char
(
self
.
pred
.
columns
)
...
...
@@ -252,6 +253,7 @@ class comparison_training_prediction_dataset:
os
.
remove
(
outfile
)
self
.
train
=
pd
.
concat
([
self
.
xy_train
,
self
.
train
],
axis
=
1
)
self
.
logger
.
info
(
'
Features in the training dataset:
'
+
str
(
self
.
train
.
columns
.
tolist
()))
# Save dataframe as csv
self
.
train
.
to_csv
(
outfile
,
sep
=
'
,
'
,
index
=
False
)
...
...
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