Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LC-MS-RT-prediction
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo Schneider
LC-MS-RT-prediction
Commits
89b71acf
Commit
89b71acf
authored
7 months ago
by
Schneider Leo
Browse files
Options
Downloads
Patches
Plain Diff
local integration working
parent
ea9368b2
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
data_viz.py
+5
-5
5 additions, 5 deletions
data_viz.py
main_custom.py
+21
-2
21 additions, 2 deletions
main_custom.py
with
26 additions
and
7 deletions
data_viz.py
+
5
−
5
View file @
89b71acf
...
...
@@ -254,7 +254,7 @@ def add_length(dataframe):
dataframe
[
'
length
'
]
=
dataframe
[
'
seq
'
].
map
(
fonc
)
#
df = pd.read_csv('output/out_common_ISA_ISA_eval.csv')
df
=
pd
.
read_csv
(
'
output/out_common_ISA_ISA_eval
_2
.csv
'
)
# add_length(df)
# df['abs_error'] = np.abs(df['rt pred']-df['true rt'])
# histo_abs_error(df, display=False, save=True, path='fig/custom model res/histo_ISA_ISA_eval.png')
...
...
@@ -275,11 +275,11 @@ def add_length(dataframe):
# scatter_rt(df, display=False, save=True, path='fig/custom model res/RT_pred_prosit_ISA_eval.png', color=True)
# histo_length_by_error(df, bins=10, display=False, save=True, path='fig/custom model res/histo_length_prosit_ISA_eval.png')
# df = pd.read_csv('output/out_common_ISA_ISA_eval_
2
.csv')
# df = pd.read_csv('output/out_common_ISA_ISA_eval_
3
.csv')
# add_length(df)
# df['abs_error'] = np.abs(df['rt pred']-df['true rt'])
# histo_abs_error(df, display=False, save=True, path='fig/custom model res/histo_ISA_ISA_eval_
2
.png')
# scatter_rt(df, display=False, save=True, path='fig/custom model res/RT_pred_ISA_ISA_eval_
2_seq
.png', color=True, col = '
seq
')
# histo_length_by_error(df, bins=10, display=False, save=True, path='fig/custom model res/histo_length_ISA_ISA_eval_
2
.png')
# histo_abs_error(df, display=False, save=True, path='fig/custom model res/histo_ISA_ISA_eval_
3
.png')
# scatter_rt(df, display=False, save=True, path='fig/custom model res/RT_pred_ISA_ISA_eval_
3_file
.png', color=True, col = '
file
')
# histo_length_by_error(df, bins=10, display=False, save=True, path='fig/custom model res/histo_length_ISA_ISA_eval_
3
.png')
This diff is collapsed.
Click to expand it.
main_custom.py
+
21
−
2
View file @
89b71acf
...
...
@@ -186,6 +186,16 @@ def run(epochs, eval_inter, save_inter, model, data_train, data_val, data_test,
if
e
%
save_inter
==
0
:
save
(
model
,
'
model_common_
'
+
str
(
e
)
+
'
.pt
'
)
save_pred
(
model
,
data_val
,
'
both
'
,
output
)
elif
forward
==
'
reverse
'
:
for
e
in
range
(
1
,
epochs
+
1
):
train
(
model
,
data_train
,
e
,
optimizer
,
criterion_rt
,
criterion_intensity
,
metric_rt
,
metric_intensity
,
'
both
'
,
wandb
=
wandb
)
if
e
%
eval_inter
==
0
:
eval
(
model
,
data_val
,
e
,
criterion_rt
,
criterion_intensity
,
metric_rt
,
metric_intensity
,
'
rt
'
,
wandb
=
wandb
)
if
e
%
save_inter
==
0
:
save
(
model
,
'
model_common_
'
+
str
(
e
)
+
'
.pt
'
)
save_pred
(
model
,
data_val
,
'
rt
'
,
output
)
else
:
for
e
in
range
(
1
,
epochs
+
1
):
...
...
@@ -213,7 +223,7 @@ def main(args):
data_train
,
data_val
,
data_test
=
common_dataset
.
load_data
(
path_train
=
args
.
dataset_train
,
path_val
=
args
.
dataset_val
,
path_test
=
args
.
dataset_test
,
batch_size
=
args
.
batch_size
,
length
=
25
,
pad
=
True
,
convert
=
True
,
vocab
=
'
iapuc
'
)
batch_size
=
args
.
batch_size
,
length
=
25
,
pad
=
True
,
convert
=
True
,
vocab
=
'
unmod
'
)
elif
args
.
forward
==
'
rt
'
:
data_train
,
data_val
,
data_test
=
dataloader
.
load_data
(
data_sources
=
[
args
.
dataset_train
,
args
.
dataset_val
,
args
.
dataset_test
],
batch_size
=
args
.
batch_size
,
length
=
25
)
...
...
@@ -225,7 +235,16 @@ def main(args):
_
,
data_val
,
data_test
=
common_dataset
.
load_data
(
path_train
=
args
.
dataset_val
,
path_val
=
args
.
dataset_val
,
path_test
=
args
.
dataset_test
,
batch_size
=
args
.
batch_size
,
length
=
25
,
pad
=
True
,
convert
=
True
,
vocab
=
'
iapuc
'
)
batch_size
=
args
.
batch_size
,
length
=
25
,
pad
=
True
,
convert
=
True
,
vocab
=
'
unmod
'
)
elif
args
.
forward
==
'
reverse
'
:
_
,
data_val
,
data_test
=
dataloader
.
load_data
(
data_sources
=
[
'
database/data_holdout.csv
'
,
args
.
dataset_val
,
args
.
dataset_test
],
batch_size
=
args
.
batch_size
,
length
=
25
)
data_train
,
_
,
_
=
common_dataset
.
load_data
(
path_train
=
args
.
dataset_train
,
path_val
=
args
.
dataset_train
,
path_test
=
args
.
dataset_train
,
batch_size
=
args
.
batch_size
,
length
=
25
,
pad
=
True
,
convert
=
True
,
vocab
=
'
unmod
'
)
print
(
'
\n
Data loaded
'
)
...
...
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