Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Naundorf
HPC_Vehicle_Classification
Commits
7410d753
Commit
7410d753
authored
Jun 18, 2022
by
Naundorf
Browse files
Update KI-KNN
parent
8428d970
Pipeline
#6559
failed with stage
in 2 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
KI-KNN
View file @
7410d753
...
...
@@ -122,5 +122,12 @@ def predict(X_test, y_test):
target_names
=
[
constants
.0
,
constants
.1
]
print
(
classification_report
(
y_test
,
predictions
,
target_names
=
target_names
))
def
normalize_data
(
data
):
#
normalizing
-
Extracting
Remaining
Columns
as
X
and
normalizing
them
to
a
common
scale
scaler
=
StandardScaler
()
print
(
data
.
iloc
[:,
:-
1
])
X
=
scaler
.
fit_transform
(
np
.
array
(
data
.
iloc
[:,
:-
1
],
dtype
=
float
))
X
=
X
.
reshape
(-
1
,
constants
.
N_
,
constants
.
MAX_LEN
,
constants
.
CHANNELS
)
return
X
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment