Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MPBA
INF
Commits
ced6744b
Commit
ced6744b
authored
Feb 04, 2020
by
Alessia Marcolini
Browse files
Merge branch 'master' of gitlab.fbk.eu:MPBA/inf_revamped
parents
98add45e
e108062a
Changes
1
Hide whitespace changes
Inline
Side-by-side
sklearn_validation.py
View file @
ced6744b
...
...
@@ -89,13 +89,12 @@ le = preprocessing.LabelEncoder()
# load data
sample_names_tr
,
var_names_tr
,
x_tr
=
load_data
(
TR_TOPFEATS
)
y_tr
=
pd
.
read_csv
(
LABELSFILE
,
sep
=
'
\t
'
,
header
=
None
).
values
y_tr
=
pd
.
read_csv
(
LABELSFILE
,
sep
=
'
\t
'
,
header
=
None
,
dtype
=
str
).
values
y_tr
=
le
.
fit_transform
(
y_tr
)
print
(
y_tr
.
shape
)
sample_names_ts
,
var_names_ts
,
x_ts
=
load_data
(
TS_TOPFEATS
)
# load the TS labels if available
if
TSLABELSFILE
is
not
None
:
y_ts
=
pd
.
read_csv
(
TSLABELSFILE
,
sep
=
'
\t
'
,
header
=
None
,
dtype
=
str
).
values
y_ts
=
pd
.
read_csv
(
TSLABELSFILE
,
header
=
None
,
dtype
=
str
).
values
y_ts
=
le
.
transform
(
y_ts
)
...
...
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