Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
77d9eba8
Commit
77d9eba8
authored
Apr 14, 2021
by
lucas_miranda
Browse files
Added extra branch to main autoencoder for rule_based prediction
parent
8aaccee7
Changes
2
Hide whitespace changes
Inline
Side-by-side
deepof/train_utils.py
View file @
77d9eba8
...
...
@@ -81,6 +81,7 @@ def get_callbacks(
entropy_knn
:
int
=
100
,
logparam
:
dict
=
None
,
outpath
:
str
=
"."
,
run
:
int
=
False
,
)
->
List
[
Union
[
Any
]]:
"""Generates callbacks for model training, including:
- run_ID: run name, with coarse parameter details;
...
...
@@ -117,7 +118,8 @@ def get_callbacks(
(
"_encoding={}"
.
format
(
logparam
[
"encoding"
])
if
logparam
is
not
None
else
""
),
(
"_k={}"
.
format
(
logparam
[
"k"
])
if
logparam
is
not
None
else
""
),
(
"_latreg={}"
.
format
(
latreg
)),
(
"entknn={}"
.
format
(
entropy_knn
)),
(
"_entknn={}"
.
format
(
entropy_knn
)),
(
"_run={}"
.
format
(
run
)
if
run
else
""
),
(
datetime
.
now
().
strftime
(
"%Y%m%d-%H%M%S"
)),
)
...
...
deepof_experiments.smk
View file @
77d9eba8
...
...
@@ -15,10 +15,10 @@ import os
outpath = "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/"
losses = ["ELBO"
, "MMD", "ELBO+MMD"]
encodings =
[6] # [2, 4, 6, 8, 10, 12, 14, 16]
cluster_numbers = [25] # [1, 5, 10, 15, 20, 25]
latent_reg = ["none"] # ["none", "categorical", "variance", "categorical+variance"]
losses = ["ELBO", "MMD", "ELBO+MMD"]
encodings = [6]
# [2, 4, 6, 8, 10, 12, 14, 16]
cluster_numbers = [25]
# [1, 5, 10, 15, 20, 25]
latent_reg = ["none"]
# ["none", "categorical", "variance", "categorical+variance"]
entropy_knn = [100]
next_sequence_pred_weights = [0.0, 0.15, 0.30]
phenotype_pred_weights = [0.0, 0.15]
...
...
@@ -26,11 +26,11 @@ rule_based_pred_weights = [0.0, 0.15, 0.30]
input_types = ["coords"]
run = list(range(1, 11))
rule deepof_experiments:
input:
# Elliptical arena detection
# "/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/supplementary_notebooks/recognise_elliptical_arena.ipynb",
# Hyperparameter tuning
# expand(
# os.path.join(
...
...
@@ -41,11 +41,19 @@ rule deepof_experiments:
# k=cluster_numbers,
# enc=encodings,
# ),
# Train a variety of models
expand(
"/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/logs/train_models/trained_weights/"
"GMVAE_loss={loss}_encoding={encs}_k={k}_latreg={latreg}_entropyknn={entknn}_final_weights.h5",
"GMVAE_NextSeqPred={nspredweight}_"
"PhenoPred={phenpredweight}_"
"RuleBasedPred={rulesweight}_"
"loss={loss}_"
"encoding={encs}_"
"k={k}_"
"latreg={latreg}_"
"entropyknn={entknn}_"
"run={run}_"
"final_weights.h5",
input_type=input_types,
loss=losses,
encs=encodings,
...
...
@@ -58,6 +66,7 @@ rule deepof_experiments:
run=run,
),
rule elliptical_arena_detector:
input:
to_exec="/psycl/g/mpsstatgen/lucas/DLC/DLC_autoencoders/DeepOF/deepof/supplementary_notebooks/recognise_elliptical_arena_blank.ipynb",
...
...
@@ -132,6 +141,4 @@ rule train_models:
"--window-size 24 "
"--window-step 12 "
"--run {wildcards.run}"
"--output-path {outpath}latent_regularization_experiments"
# "--exclude-bodyparts Tail_base,Tail_1,Tail_2,Tail_tip "
\ No newline at end of file
"--output-path {outpath}train_models"
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