Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NIRS_Workflow
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CEFE
PACE
NIRS_Workflow
Commits
6cc968b4
Commit
6cc968b4
authored
5 months ago
by
DIANE Abderrahim
Browse files
Options
Downloads
Patches
Plain Diff
errors correction
parent
640e258c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utils/data_parsing.py
+2
-2
2 additions, 2 deletions
src/utils/data_parsing.py
src/utils/miscellaneous.py
+1
-1
1 addition, 1 deletion
src/utils/miscellaneous.py
with
3 additions
and
3 deletions
src/utils/data_parsing.py
+
2
−
2
View file @
6cc968b4
...
...
@@ -90,7 +90,7 @@ class JcampParser:
@property
def
meta_data_st_
(
self
):
me
=
self
.
metadata_
.
drop
(
"
concentrations
"
,
axis
=
1
)
me
=
me
.
drop
(
me
.
columns
[(
me
==
''
).
all
()],
axis
=
1
).
apply
map
(
lambda
x
:
x
.
upper
()
if
isinstance
(
x
,
str
)
else
x
)
me
=
me
.
drop
(
me
.
columns
[(
me
==
''
).
all
()],
axis
=
1
).
map
(
lambda
x
:
x
.
upper
()
if
isinstance
(
x
,
str
)
else
x
)
meta_data_st
=
me
.
loc
[:,
me
.
nunique
(
axis
=
0
)
>
1
]
return
meta_data_st
...
...
@@ -124,7 +124,7 @@ class CsvParser:
@property
def
meta_data_st_
(
self
):
me
=
self
.
non_float
.
apply
map
(
lambda
x
:
x
.
upper
()
if
isinstance
(
x
,
str
)
else
x
)
me
=
self
.
non_float
.
map
(
lambda
x
:
x
.
upper
()
if
isinstance
(
x
,
str
)
else
x
)
meta_data_st
=
me
.
loc
[:,
me
.
nunique
(
axis
=
0
)
>
1
]
return
meta_data_st
...
...
This diff is collapsed.
Click to expand it.
src/utils/miscellaneous.py
+
1
−
1
View file @
6cc968b4
...
...
@@ -24,7 +24,7 @@ def download_results(data, export_name):
def
data_split
(
x
,
y
):
from
kennard_stone
import
train_test_split
# Split data into training and test sets using the kennard_stone method and correlation metric, 25% of data is used for testing
X_train
,
X_test
,
y_train
,
y_test
=
train_test_split
(
x
,
y
,
test_size
=
0.25
,
random_state
=
42
)
X_train
,
X_test
,
y_train
,
y_test
=
train_test_split
(
x
,
y
,
test_size
=
0.25
)
train_index
,
test_index
=
np
.
array
(
X_train
.
index
),
np
.
array
(
X_test
.
index
)
return
X_train
,
X_test
,
y_train
,
y_test
,
train_index
,
test_index
...
...
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