Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Ludovic PLATON
/
IRSOM
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ludovic PLATON
2018-05-09 14:26:26 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ad1c305ffb76164a544b8560719f43290150b0c
0ad1c305
1 parent
6c514cfa
Working rejection
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
scripts/predict.py
scripts/predict.py
View file @
0ad1c30
...
...
@@ -67,8 +67,10 @@ def main():
print
(
"Model loaded"
)
y
,
proba
=
ssom
.
predict
(
data
)
y
=
np
.
array
(
y
)
if
not
arguments
[
"--reject"
]:
y
[
np
.
absolute
(
proba
[:,
0
]
-
proba
[:,
1
])
<
float
(
arguments
[
"--reject"
])]
=
-
1
if
arguments
[
"--reject"
]:
diff
=
np
.
absolute
(
proba
[:,
0
]
-
proba
[:,
1
])
thresh
=
float
(
arguments
[
"--reject"
])
y
[
diff
<
thresh
]
=
-
1
bmu
=
np
.
array
(
som
.
get_BMUS
(
data
))
save_pred
(
som
,
data
,
data_names
,
y
,
proba
,
bmu
,
output_path
)
...
...
Please
register
or
login
to post a comment