Пример #1
0
vame.evaluate_model(config)

# Step 4:
# Segment motifs/pose
vame.pose_segmentation(config)

#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# The following are optional choices to create motif videos, communities/hierarchies of behavior,
# community videos

# OPTIONIAL: Create motif videos to get insights about the fine grained poses
vame.motif_videos(config, videoType='.mp4')

# OPTIONAL: Create behavioural hierarchies via community detection
vame.community(config, umap_vis=False, cut_tree=2)

# OPTIONAL: Create community videos to get insights about behavior on a hierarchical scale
vame.community_videos(config)

# OPTIONAL: Down projection of latent vectors and visualization via UMAP
vame.visualization(config,
                   label=None)  #options: label: None, "motif", "community"

# OPTIONAL: Use the generative model (reconstruction decoder) to sample from
# the learned data distribution, reconstruct random real samples or visualize
# the cluster center for validation
vame.generative_model(
    config,
    mode="centers")  #options: mode: "sampling", "reconstruction", "centers
Пример #2
0
vame.evaluate_model(config)

# Step 4:
# Segment motifs/pose
vame.pose_segmentation(config)

#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# The following are optional choices to create motif videos, communities/hierarchies of behavior,
# community videos

# OPTIONIAL: Create motif videos to get insights about the fine grained poses
vame.motif_videos(config, videoType='.mp4')

# OPTIONAL: Create behavioural hierarchies via community detection
vame.community(config, show_umap=False, cut_tree=2)

# OPTIONAL: Create community videos to get insights about behavior on a hierarchical scale
vame.community_videos(config)

# OPTIONAL: Down projection of latent vectors and visualization via UMAP
vame.visualization(config,
                   label=None)  #options: label: None, "motif", "community"

# OPTIONAL: Use the generative model (reconstruction decoder) to sample from
# the learned data distribution, reconstruct random real samples or visualize
# the cluster center for validation
vame.generative_model(
    config, mode="centers"
)  #options: mode: "sampling", "reconstruction", "centers", "motifs"
Пример #3
0
                             model_name=modelName,
                             cluster_method='kmeans',
                             n_cluster=15)

#Plot transition matrices
files = os.listdir(os.path.join(projectPath, 'results/'))
n_cluster = 10
plot_transitions(config, files, n_cluster, modelName, cluster_method='kmeans')

###NEW COMMUNITY PLOTTING

vame.pose_segmentation(config)

import matplotlib
matplotlib.use('Qt5Agg')
vame.community(config, show_umap=False)

###Run groupwise comparisons
ctrl_mice = [
    'C1-RT', 'C3-RB', 'C5-NP', 'C5-RT', 'C9_LT', 'C12_NP', 'C13_RT', 'C14_LT',
    'C14_LB', 'C15_RT', 'C16_RB'
]
cko_mice = [
    'C2-RB', 'C3-LT', 'C4-NP', 'C4-RT', 'C10_NP', 'C12_RT', 'C13_NP', 'C14_RT',
    'C15_NP', 'C16_NP'
]
#phases=['Saline', 'Phase1', 'Phase2', 'Phase3']
phases = ['11-06', '10-24']
group1 = ctrl_mice
group2 = cko_mice