diff --git a/404.html b/404.html index ea0a5db3..d67e4bcd 100644 --- a/404.html +++ b/404.html @@ -5,8 +5,8 @@ Page Not Found | VAME - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

diff --git a/assets/js/04a8f406.31392b8a.js b/assets/js/04a8f406.31392b8a.js new file mode 100644 index 00000000..93dcc48b --- /dev/null +++ b/assets/js/04a8f406.31392b8a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[88],{445:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var i=t(4848),r=t(8453);const s={sidebar_label:"new",title:"vame.initialize_project.new"},o=void 0,c={id:"reference/vame/initialize_project/new",title:"vame.initialize_project.new",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/initialize_project/new.md",sourceDirName:"reference/vame/initialize_project",slug:"/reference/vame/initialize_project/new",permalink:"/VAME/docs/reference/vame/initialize_project/new",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"new",title:"vame.initialize_project.new"},sidebar:"docsSidebar",previous:{title:"videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter"},next:{title:"logger",permalink:"/VAME/docs/reference/vame/logging/logger"}},l={},a=[{value:"init_new_project",id:"init_new_project",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.p,{children:"The following code is adapted from:"}),"\n",(0,i.jsxs)(n.p,{children:["DeepLabCut2.0 Toolbox (deeplabcut.org)\n\xa9 A. & M. Mathis Labs\n",(0,i.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut",children:"https://github.com/AlexEMG/DeepLabCut"}),"\nPlease see AUTHORS for contributors.\n",(0,i.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS",children:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS"}),"\nLicensed under GNU Lesser General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"init_new_project",children:"init_new_project"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def init_new_project(project: str,\n videos: List[str],\n poses_estimations: List[str],\n working_directory: str = None,\n videotype: str = '.mp4') -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Creates a new VAME project with the given parameters."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"project"})," ",(0,i.jsx)(n.em,{children:"str"})," - Project name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"videos"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of videos paths to be used in the project. E.g. ['./sample_data/Session001.mp4']"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"poses_estimations"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of pose estimation files paths to be used in the project. E.g. ['./sample_data/pose estimation/Session001.csv'] working_directory (str, optional): ",(0,i.jsx)(n.em,{children:"description"}),". Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"videotype"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Video extension (.mp4 or .avi). Defaults to '.mp4'."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"projconfigfile"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the new vame project config file."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/04a8f406.535ed57a.js b/assets/js/04a8f406.535ed57a.js deleted file mode 100644 index 391f70f9..00000000 --- a/assets/js/04a8f406.535ed57a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[88],{445:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var i=t(4848),r=t(8453);const s={sidebar_label:"new",title:"vame.initialize_project.new"},o=void 0,c={id:"reference/vame/initialize_project/new",title:"vame.initialize_project.new",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/initialize_project/new.md",sourceDirName:"reference/vame/initialize_project",slug:"/reference/vame/initialize_project/new",permalink:"/VAME/docs/reference/vame/initialize_project/new",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"new",title:"vame.initialize_project.new"},sidebar:"docsSidebar",previous:{title:"videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter"},next:{title:"create_training",permalink:"/VAME/docs/reference/vame/model/create_training"}},l={},a=[{value:"init_new_project",id:"init_new_project",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.p,{children:"The following code is adapted from:"}),"\n",(0,i.jsxs)(n.p,{children:["DeepLabCut2.0 Toolbox (deeplabcut.org)\n\xa9 A. & M. Mathis Labs\n",(0,i.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut",children:"https://github.com/AlexEMG/DeepLabCut"}),"\nPlease see AUTHORS for contributors.\n",(0,i.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS",children:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS"}),"\nLicensed under GNU Lesser General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"init_new_project",children:"init_new_project"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def init_new_project(project: str,\n videos: List[str],\n poses_estimations: List[str],\n working_directory: str = None,\n videotype: str = '.mp4') -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Creates a new VAME project with the given parameters."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"project"})," ",(0,i.jsx)(n.em,{children:"str"})," - Project name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"videos"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of videos paths to be used in the project. E.g. ['./sample_data/Session001.mp4']"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"poses_estimations"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of pose estimation files paths to be used in the project. E.g. ['./sample_data/pose estimation/Session001.csv'] working_directory (str, optional): ",(0,i.jsx)(n.em,{children:"description"}),". Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"videotype"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Video extension (.mp4 or .avi). Defaults to '.mp4'."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"projconfigfile"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the new vame project config file."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17f06cf5.0d25968e.js b/assets/js/17f06cf5.0d25968e.js new file mode 100644 index 00000000..1834e612 --- /dev/null +++ b/assets/js/17f06cf5.0d25968e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8247],{2129:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>a});var o=l(4848),t=l(8453);const s={sidebar_label:"evaluate",title:"vame.model.evaluate"},r=void 0,i={id:"reference/vame/model/evaluate",title:"vame.model.evaluate",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/evaluate.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"evaluate",title:"vame.model.evaluate"},sidebar:"docsSidebar",previous:{title:"dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader"},next:{title:"rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model"}},d={},a=[{value:"plot_reconstruction",id:"plot_reconstruction",level:4},{value:"plot_loss",id:"plot_loss",level:4},{value:"eval_temporal",id:"eval_temporal",level:4},{value:"evaluate_model",id:"evaluate_model",level:4}];function c(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,o.jsx)(n.h4,{id:"plot_reconstruction",children:"plot_reconstruction"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def plot_reconstruction(filepath: str,\n test_loader: Data.DataLoader,\n seq_len_half: int,\n model: RNN_VAE,\n model_name: str,\n FUTURE_DECODER: bool,\n FUTURE_STEPS: int,\n suffix: Optional[str] = None) -> None\n"})}),"\n",(0,o.jsx)(n.p,{children:"Plot the reconstruction and future prediction of the input sequence."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"filepath"})," ",(0,o.jsx)(n.em,{children:"str"})," - Path to save the plot."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"test_loader"})," ",(0,o.jsx)(n.em,{children:"Data.DataLoader"})," - DataLoader for the test dataset."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"seq_len_half"})," ",(0,o.jsx)(n.em,{children:"int"})," - Half of the temporal window size."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"model"})," ",(0,o.jsx)(n.em,{children:"RNN_VAE"})," - Trained VAE model."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"model_name"})," ",(0,o.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"FUTURE_DECODER"})," ",(0,o.jsx)(n.em,{children:"bool"})," - Flag indicating whether the model has a future prediction decoder."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,o.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"suffix"})," ",(0,o.jsx)(n.em,{children:"Optional[str], optional"})," - Suffix for the saved plot filename. Defaults to None."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"plot_loss",children:"plot_loss"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def plot_loss(cfg: dict, filepath: str, model_name: str) -> None\n"})}),"\n",(0,o.jsx)(n.p,{children:"Plot the losses of the trained model."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"cfg"})," ",(0,o.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"filepath"})," ",(0,o.jsx)(n.em,{children:"str"})," - Path to save the plot."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"model_name"})," ",(0,o.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"eval_temporal",children:"eval_temporal"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def eval_temporal(cfg: dict,\n use_gpu: bool,\n model_name: str,\n fixed: bool,\n snapshot: Optional[str] = None,\n suffix: Optional[str] = None) -> None\n"})}),"\n",(0,o.jsx)(n.p,{children:"Evaluate the temporal aspects of the trained model."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"cfg"})," ",(0,o.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"use_gpu"})," ",(0,o.jsx)(n.em,{children:"bool"})," - Flag indicating whether to use GPU for evaluation."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"model_name"})," ",(0,o.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"fixed"})," ",(0,o.jsx)(n.em,{children:"bool"})," - Flag indicating whether the data is fixed or not."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"snapshot"})," ",(0,o.jsx)(n.em,{children:"Optional[str], optional"})," - Path to the model snapshot. Defaults to None."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"suffix"})," ",(0,o.jsx)(n.em,{children:"Optional[str], optional"})," - Suffix for the saved plot filename. Defaults to None."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"evaluate_model",children:"evaluate_model"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@save_state(model=EvaluateModelFunctionSchema)\ndef evaluate_model(config: str,\n use_snapshots: bool = False,\n save_logs: bool = False) -> None\n"})}),"\n",(0,o.jsx)(n.p,{children:"Evaluate the trained model."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"config"})," ",(0,o.jsx)(n.em,{children:"str"})," - Path to config file."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"use_snapshots"})," ",(0,o.jsx)(n.em,{children:"bool, optional"})," - Whether to plot for all snapshots or only the best model. Defaults to False."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>r,x:()=>i});var o=l(6540);const t={},s=o.createContext(t);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17f06cf5.d6430700.js b/assets/js/17f06cf5.d6430700.js deleted file mode 100644 index 2c0455d5..00000000 --- a/assets/js/17f06cf5.d6430700.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8247],{2129:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>a});var t=l(4848),o=l(8453);const s={sidebar_label:"evaluate",title:"vame.model.evaluate"},r=void 0,i={id:"reference/vame/model/evaluate",title:"vame.model.evaluate",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/evaluate.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"evaluate",title:"vame.model.evaluate"},sidebar:"docsSidebar",previous:{title:"dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader"},next:{title:"rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model"}},d={},a=[{value:"plot_reconstruction",id:"plot_reconstruction",level:4},{value:"plot_loss",id:"plot_loss",level:4},{value:"eval_temporal",id:"eval_temporal",level:4},{value:"evaluate_model",id:"evaluate_model",level:4}];function c(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,t.jsx)(n.h4,{id:"plot_reconstruction",children:"plot_reconstruction"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def plot_reconstruction(filepath: str,\n test_loader: Data.DataLoader,\n seq_len_half: int,\n model: RNN_VAE,\n model_name: str,\n FUTURE_DECODER: bool,\n FUTURE_STEPS: int,\n suffix: Optional[str] = None) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Plot the reconstruction and future prediction of the input sequence."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"filepath"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to save the plot."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"test_loader"})," ",(0,t.jsx)(n.em,{children:"Data.DataLoader"})," - DataLoader for the test dataset."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"seq_len_half"})," ",(0,t.jsx)(n.em,{children:"int"})," - Half of the temporal window size."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model"})," ",(0,t.jsx)(n.em,{children:"RNN_VAE"})," - Trained VAE model."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model_name"})," ",(0,t.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"FUTURE_DECODER"})," ",(0,t.jsx)(n.em,{children:"bool"})," - Flag indicating whether the model has a future prediction decoder."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,t.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"suffix"})," ",(0,t.jsx)(n.em,{children:"Optional[str], optional"})," - Suffix for the saved plot filename. Defaults to None."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"plot_loss",children:"plot_loss"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def plot_loss(cfg: dict, filepath: str, model_name: str) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Plot the losses of the trained model."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"cfg"})," ",(0,t.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"filepath"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to save the plot."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model_name"})," ",(0,t.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"eval_temporal",children:"eval_temporal"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def eval_temporal(cfg: dict,\n use_gpu: bool,\n model_name: str,\n fixed: bool,\n snapshot: Optional[str] = None,\n suffix: Optional[str] = None) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Evaluate the temporal aspects of the trained model."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"cfg"})," ",(0,t.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"use_gpu"})," ",(0,t.jsx)(n.em,{children:"bool"})," - Flag indicating whether to use GPU for evaluation."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model_name"})," ",(0,t.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"fixed"})," ",(0,t.jsx)(n.em,{children:"bool"})," - Flag indicating whether the data is fixed or not."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"snapshot"})," ",(0,t.jsx)(n.em,{children:"Optional[str], optional"})," - Path to the model snapshot. Defaults to None."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"suffix"})," ",(0,t.jsx)(n.em,{children:"Optional[str], optional"})," - Suffix for the saved plot filename. Defaults to None."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"evaluate_model",children:"evaluate_model"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def evaluate_model(config: str, use_snapshots: bool = False) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Evaluate the trained model."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"config"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to config file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"use_snapshots"})," ",(0,t.jsx)(n.em,{children:"bool, optional"})," - Whether to plot for all snapshots or only the best model. Defaults to False."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>r,x:()=>i});var t=l(6540);const o={},s=t.createContext(o);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/20a1189d.e091510a.js b/assets/js/20a1189d.5177a708.js similarity index 60% rename from assets/js/20a1189d.e091510a.js rename to assets/js/20a1189d.5177a708.js index 9baf4b42..4db7f298 100644 --- a/assets/js/20a1189d.e091510a.js +++ b/assets/js/20a1189d.5177a708.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3567],{3072:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>a});var r=i(4848),s=i(8453);const t={sidebar_label:"gif_creator",title:"vame.analysis.gif_creator"},l=void 0,c={id:"reference/vame/analysis/gif_creator",title:"vame.analysis.gif_creator",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/gif_creator.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"gif_creator",title:"vame.analysis.gif_creator"},sidebar:"docsSidebar",previous:{title:"generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions"},next:{title:"pose_segmentation",permalink:"/VAME/docs/reference/vame/analysis/pose_segmentation"}},o={},a=[{value:"create_video",id:"create_video",level:4},{value:"gif",id:"gif",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"create_video",children:"create_video"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def create_video(path_to_file: str, file: str, embed: np.ndarray,\n clabel: np.ndarray, frames: List[np.ndarray], start: int,\n length: int, max_lag: int, num_points: int) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create video frames for the given embedding."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"file"})," ",(0,r.jsx)(n.em,{children:"str"})," - File name."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"embed"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Embedding array."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"clabel"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Cluster labels."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frames"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Starting index."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"length"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the video."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"max_lag"})," ",(0,r.jsx)(n.em,{children:"int"})," - Maximum lag."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"num_points"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of points."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"None"}),"\n",(0,r.jsx)(n.h4,{id:"gif",children:"gif"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def gif(\n config: str,\n pose_ref_index: int,\n subtract_background: bool = True,\n start: int = None,\n length: int = 500,\n max_lag: int = 30,\n label: str = 'community',\n file_format: str = '.mp4',\n crop_size: Tuple[int, int] = (300, 300)) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create a GIF from the given configuration."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"int"})," - Pose reference index."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"subtract_background"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to subtract background. Defaults to True."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"start"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Starting index. Defaults to None."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"length"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Length of the video. Defaults to 500."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"max_lag"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Maximum lag. Defaults to 30."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"label"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Label type. Defaults to 'community'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"file_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - File format. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int], optional"})," - Crop size. Defaults to (300,300)."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>c});var r=i(6540);const s={},t=r.createContext(s);function l(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3567],{3072:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>a});var r=i(4848),s=i(8453);const t={sidebar_label:"gif_creator",title:"vame.analysis.gif_creator"},l=void 0,c={id:"reference/vame/analysis/gif_creator",title:"vame.analysis.gif_creator",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/gif_creator.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"gif_creator",title:"vame.analysis.gif_creator"},sidebar:"docsSidebar",previous:{title:"generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions"},next:{title:"pose_segmentation",permalink:"/VAME/docs/reference/vame/analysis/pose_segmentation"}},o={},a=[{value:"create_video",id:"create_video",level:4},{value:"gif",id:"gif",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"create_video",children:"create_video"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def create_video(path_to_file: str, file: str, embed: np.ndarray,\n clabel: np.ndarray, frames: List[np.ndarray], start: int,\n length: int, max_lag: int, num_points: int) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create video frames for the given embedding."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"file"})," ",(0,r.jsx)(n.em,{children:"str"})," - File name."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"embed"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Embedding array."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"clabel"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Cluster labels."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frames"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Starting index."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"length"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the video."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"max_lag"})," ",(0,r.jsx)(n.em,{children:"int"})," - Maximum lag."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"num_points"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of points."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"None"}),"\n",(0,r.jsx)(n.h4,{id:"gif",children:"gif"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def gif(\n config: str,\n pose_ref_index: int,\n subtract_background: bool = True,\n start: int | None = None,\n length: int = 500,\n max_lag: int = 30,\n label: str = 'community',\n file_format: str = '.mp4',\n crop_size: Tuple[int, int] = (300, 300)) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Create a GIF from the given configuration."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"int"})," - Pose reference index."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"subtract_background"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to subtract background. Defaults to True."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"start"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Starting index. Defaults to None."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"length"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Length of the video. Defaults to 500."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"max_lag"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Maximum lag. Defaults to 30."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"label"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Label type [None, community, motif]. Defaults to 'community'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"file_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - File format. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int], optional"})," - Crop size. Defaults to (300,300)."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>c});var r=i(6540);const s={},t=r.createContext(s);function l(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2707696f.3b8a57d4.js b/assets/js/2707696f.3b8a57d4.js new file mode 100644 index 00000000..c11ebeaa --- /dev/null +++ b/assets/js/2707696f.3b8a57d4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7382],{7275:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>o});var t=i(4848),r=i(8453);const c={sidebar_label:"auxiliary",title:"vame.util.auxiliary"},l=void 0,a={id:"reference/vame/util/auxiliary",title:"vame.util.auxiliary",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/auxiliary.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"auxiliary",title:"vame.util.auxiliary"},sidebar:"docsSidebar",previous:{title:"align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical"},next:{title:"csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy"}},s={},o=[{value:"create_config_template",id:"create_config_template",level:4},{value:"read_config",id:"read_config",level:4},{value:"write_config",id:"write_config",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,t.jsx)(n.p,{children:"The following code is adapted from:"}),"\n",(0,t.jsxs)(n.p,{children:["DeepLabCut2.0 Toolbox (deeplabcut.org)\n\xa9 A. & M. Mathis Labs\n",(0,t.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut",children:"https://github.com/AlexEMG/DeepLabCut"}),"\nPlease see AUTHORS for contributors.\n",(0,t.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS",children:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS"}),"\nLicensed under GNU Lesser General Public License v3.0"]}),"\n",(0,t.jsx)(n.h4,{id:"create_config_template",children:"create_config_template"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def create_config_template() -> Tuple[dict, ruamel.yaml.YAML]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Creates a template for the config.yaml file."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(n.p,{children:"Tuple[dict, ruamel.yaml.YAML]: A tuple containing the template dictionary and the Ruamel YAML instance."}),"\n",(0,t.jsx)(n.h4,{id:"read_config",children:"read_config"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def read_config(configname: str) -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Reads structured config file defining a project."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"configname"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"dict"})," - The contents of the config file as a dictionary."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"write_config",children:"write_config"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def write_config(configname: str, cfg: dict) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Write structured config file."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"configname"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"cfg"})," ",(0,t.jsx)(n.em,{children:"dict"})," - Dictionary containing the config data."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>a});var t=i(6540);const r={},c=t.createContext(r);function l(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2707696f.569d9539.js b/assets/js/2707696f.569d9539.js deleted file mode 100644 index 1ed58077..00000000 --- a/assets/js/2707696f.569d9539.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7382],{7275:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>o});var t=i(4848),r=i(8453);const c={sidebar_label:"auxiliary",title:"vame.util.auxiliary"},l=void 0,s={id:"reference/vame/util/auxiliary",title:"vame.util.auxiliary",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/auxiliary.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"auxiliary",title:"vame.util.auxiliary"},sidebar:"docsSidebar",previous:{title:"align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical"},next:{title:"csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy"}},a={},o=[{value:"create_config_template",id:"create_config_template",level:4},{value:"read_config",id:"read_config",level:4},{value:"write_config",id:"write_config",level:4},{value:"update_config",id:"update_config",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,t.jsx)(n.p,{children:"The following code is adapted from:"}),"\n",(0,t.jsxs)(n.p,{children:["DeepLabCut2.0 Toolbox (deeplabcut.org)\n\xa9 A. & M. Mathis Labs\n",(0,t.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut",children:"https://github.com/AlexEMG/DeepLabCut"}),"\nPlease see AUTHORS for contributors.\n",(0,t.jsx)(n.a,{href:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS",children:"https://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS"}),"\nLicensed under GNU Lesser General Public License v3.0"]}),"\n",(0,t.jsx)(n.h4,{id:"create_config_template",children:"create_config_template"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def create_config_template() -> Tuple[dict, ruamel.yaml.YAML]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Creates a template for the config.yaml file."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(n.p,{children:"Tuple[dict, ruamel.yaml.YAML]: A tuple containing the template dictionary and the Ruamel YAML instance."}),"\n",(0,t.jsx)(n.h4,{id:"read_config",children:"read_config"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def read_config(configname: str) -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Reads structured config file defining a project."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"configname"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"dict"})," - The contents of the config file as a dictionary."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"write_config",children:"write_config"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def write_config(configname: str, cfg: dict) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Write structured config file."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"configname"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"cfg"})," ",(0,t.jsx)(n.em,{children:"dict"})," - Dictionary containing the config data."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"update_config",children:"update_config"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def update_config(config: str, force_update: bool = False) -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Updates the configuration file with default values."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"config"})," ",(0,t.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"force_update"})," ",(0,t.jsx)(n.em,{children:"bool, optional"})," - Whether to force the update even if the user declines. Defaults to False."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>s});var t=i(6540);const r={},c=t.createContext(r);function l(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a52db76.2a5860b2.js b/assets/js/3a52db76.2a5860b2.js new file mode 100644 index 00000000..e2bc2262 --- /dev/null +++ b/assets/js/3a52db76.2a5860b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7707],{3265:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var i=s(4848),r=s(8453);const l={sidebar_label:"pose_segmentation",title:"vame.analysis.pose_segmentation"},t=void 0,d={id:"reference/vame/analysis/pose_segmentation",title:"vame.analysis.pose_segmentation",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/pose_segmentation.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/pose_segmentation",permalink:"/VAME/docs/reference/vame/analysis/pose_segmentation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"pose_segmentation",title:"vame.analysis.pose_segmentation"},sidebar:"docsSidebar",previous:{title:"gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator"},next:{title:"segment_behavior",permalink:"/VAME/docs/reference/vame/analysis/segment_behavior"}},a={},c=[{value:"load_model",id:"load_model",level:4},{value:"embedd_latent_vectors",id:"embedd_latent_vectors",level:4},{value:"consecutive",id:"consecutive",level:4},{value:"get_motif_usage",id:"get_motif_usage",level:4},{value:"same_parametrization",id:"same_parametrization",level:4},{value:"individual_parametrization",id:"individual_parametrization",level:4},{value:"pose_segmentation",id:"pose_segmentation",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"load_model",children:"load_model"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def load_model(cfg: dict, model_name: str, fixed: bool) -> RNN_VAE\n"})}),"\n",(0,i.jsx)(n.p,{children:"Load the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"fixed"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Fixed or variable length sequences."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"RNN_VAE"})," - Loaded VAME model."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"embedd_latent_vectors",children:"embedd_latent_vectors"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def embedd_latent_vectors(\n cfg: dict, files: List[str], model: RNN_VAE, fixed: bool,\n tqdm_stream: TqdmToLogger | None) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Embed latent vectors for the given files using the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model"})," ",(0,i.jsx)(n.em,{children:"RNN_VAE"})," - VAME model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"fixed"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether the model is fixed."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tqdm_stream"})," ",(0,i.jsx)(n.em,{children:"TqdmToLogger"})," - TQDM Stream to redirect the tqdm output to logger."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of latent vectors for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"consecutive",children:"consecutive"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find consecutive sequences in the data array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"stepsize"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Step size. Defaults to 1."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of consecutive sequences."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_motif_usage",children:"get_motif_usage"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_motif_usage(label: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute motif usage from the label array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"label"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Label array."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array of motif usage counts."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"same_parametrization",children:"same_parametrization"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def same_parametrization(\n cfg: dict, files: List[str], latent_vector_files: List[np.ndarray],\n states: int, parametrization: str\n) -> Tuple[List[np.ndarray], List[np.ndarray], List[np.ndarray]]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Apply the same parametrization to all animals."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"latent_vector_files"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of latent vector arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"states"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of states."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization method."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple of labels, cluster centers, and motif usages."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"individual_parametrization",children:"individual_parametrization"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def individual_parametrization(cfg: dict, files: List[str],\n latent_vector_files: List[np.ndarray],\n cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Apply individual parametrization to each animal."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"latent_vector_files"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of latent vector arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple of labels, cluster centers, and motif usages."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"pose_segmentation",children:"pose_segmentation"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@save_state(model=PoseSegmentationFunctionSchema)\ndef pose_segmentation(config: str, save_logs: bool = False) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform pose segmentation using the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var i=s(6540);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a52db76.7539a7ec.js b/assets/js/3a52db76.7539a7ec.js deleted file mode 100644 index b65efbf8..00000000 --- a/assets/js/3a52db76.7539a7ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7707],{3265:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var i=s(4848),r=s(8453);const l={sidebar_label:"pose_segmentation",title:"vame.analysis.pose_segmentation"},t=void 0,d={id:"reference/vame/analysis/pose_segmentation",title:"vame.analysis.pose_segmentation",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/pose_segmentation.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/pose_segmentation",permalink:"/VAME/docs/reference/vame/analysis/pose_segmentation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"pose_segmentation",title:"vame.analysis.pose_segmentation"},sidebar:"docsSidebar",previous:{title:"gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator"},next:{title:"segment_behavior",permalink:"/VAME/docs/reference/vame/analysis/segment_behavior"}},a={},c=[{value:"load_model",id:"load_model",level:4},{value:"embedd_latent_vectors",id:"embedd_latent_vectors",level:4},{value:"consecutive",id:"consecutive",level:4},{value:"get_motif_usage",id:"get_motif_usage",level:4},{value:"same_parametrization",id:"same_parametrization",level:4},{value:"individual_parametrization",id:"individual_parametrization",level:4},{value:"pose_segmentation",id:"pose_segmentation",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"load_model",children:"load_model"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def load_model(cfg: dict, model_name: str, fixed: bool) -> RNN_VAE\n"})}),"\n",(0,i.jsx)(n.p,{children:"Load the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"fixed"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Fixed or variable length sequences."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"RNN_VAE"})," - Loaded VAME model."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"embedd_latent_vectors",children:"embedd_latent_vectors"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def embedd_latent_vectors(cfg: dict, files: List[str], model: RNN_VAE,\n fixed: bool) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Embed latent vectors for the given files using the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model"})," ",(0,i.jsx)(n.em,{children:"RNN_VAE"})," - VAME model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"fixed"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether the model is fixed."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of latent vectors for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"consecutive",children:"consecutive"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find consecutive sequences in the data array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"stepsize"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Step size. Defaults to 1."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of consecutive sequences."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_motif_usage",children:"get_motif_usage"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_motif_usage(label: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute motif usage from the label array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"label"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Label array."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array of motif usage counts."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"same_parametrization",children:"same_parametrization"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def same_parametrization(\n cfg: dict, files: List[str], latent_vector_files: List[np.ndarray],\n states: int, parametrization: str\n) -> Tuple[List[np.ndarray], List[np.ndarray], List[np.ndarray]]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Apply the same parametrization to all animals."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"latent_vector_files"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of latent vector arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"states"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of states."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization method."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple of labels, cluster centers, and motif usages."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"individual_parametrization",children:"individual_parametrization"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def individual_parametrization(cfg: dict, files: List[str],\n latent_vector_files: List[np.ndarray],\n cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Apply individual parametrization to each animal."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file names."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"latent_vector_files"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of latent vector arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple of labels, cluster centers, and motif usages."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"pose_segmentation",children:"pose_segmentation"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def pose_segmentation(config: str) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform pose segmentation using the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var i=s(6540);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3ab23e74.1815ed9c.js b/assets/js/3ab23e74.8054f473.js similarity index 76% rename from assets/js/3ab23e74.1815ed9c.js rename to assets/js/3ab23e74.8054f473.js index 6dc4be61..3ec595c2 100644 --- a/assets/js/3ab23e74.1815ed9c.js +++ b/assets/js/3ab23e74.8054f473.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[134],{1201:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>t,toc:()=>o});var s=i(4848),l=i(8453);const r={sidebar_label:"umap_visualization",title:"vame.analysis.umap_visualization"},a=void 0,t={id:"reference/vame/analysis/umap_visualization",title:"vame.analysis.umap_visualization",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/umap_visualization.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"umap_visualization",title:"vame.analysis.umap_visualization"},sidebar:"docsSidebar",previous:{title:"tree_hierarchy",permalink:"/VAME/docs/reference/vame/analysis/tree_hierarchy"},next:{title:"videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter"}},d={},o=[{value:"umap_vis",id:"umap_vis",level:4},{value:"umap_label_vis",id:"umap_label_vis",level:4},{value:"umap_vis_comm",id:"umap_vis_comm",level:4},{value:"visualization",id:"visualization",level:4}];function c(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"umap_vis",children:"umap_vis"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_vis(file: str, embed: np.ndarray, num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding without labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Plot Visualization of UMAP embedding."}),"\n",(0,s.jsx)(n.h4,{id:"umap_label_vis",children:"umap_label_vis"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_label_vis(file: str, embed: np.ndarray, label: np.ndarray,\n n_cluster: int, num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding with motif labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"label"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Motif labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"fig - Plot figure of UMAP visualization embedding with motif labels."}),"\n",(0,s.jsx)(n.h4,{id:"umap_vis_comm",children:"umap_vis_comm"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_vis_comm(file: str, embed: np.ndarray, community_label: np.ndarray,\n num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding with community labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"community_label"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Community labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"fig - Plot figure of UMAP visualization embedding with community labels."}),"\n",(0,s.jsx)(n.h4,{id:"visualization",children:"visualization"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def visualization(config: Union[str, Path],\n label: Optional[str] = None) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embeddings based on configuration settings."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"label"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of labels to visualize. Default is None."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Plot Visualization of UMAP embeddings."})]})}function u(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>t});var s=i(6540);const l={},r=s.createContext(l);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[134],{1201:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>o});var s=i(4848),l=i(8453);const a={sidebar_label:"umap_visualization",title:"vame.analysis.umap_visualization"},r=void 0,t={id:"reference/vame/analysis/umap_visualization",title:"vame.analysis.umap_visualization",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/umap_visualization.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"umap_visualization",title:"vame.analysis.umap_visualization"},sidebar:"docsSidebar",previous:{title:"tree_hierarchy",permalink:"/VAME/docs/reference/vame/analysis/tree_hierarchy"},next:{title:"videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter"}},d={},o=[{value:"umap_vis",id:"umap_vis",level:4},{value:"umap_label_vis",id:"umap_label_vis",level:4},{value:"umap_vis_comm",id:"umap_vis_comm",level:4},{value:"visualization",id:"visualization",level:4}];function c(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"umap_vis",children:"umap_vis"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_vis(file: str, embed: np.ndarray, num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding without labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Plot Visualization of UMAP embedding."}),"\n",(0,s.jsx)(n.h4,{id:"umap_label_vis",children:"umap_label_vis"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_label_vis(file: str, embed: np.ndarray, label: np.ndarray,\n n_cluster: int, num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding with motif labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"label"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Motif labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"fig - Plot figure of UMAP visualization embedding with motif labels."}),"\n",(0,s.jsx)(n.h4,{id:"umap_vis_comm",children:"umap_vis_comm"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def umap_vis_comm(file: str, embed: np.ndarray, community_label: np.ndarray,\n num_points: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embedding with community labels."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file (deprecated)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"embed"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"community_label"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Community labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"num_points"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of data points to visualize."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"fig - Plot figure of UMAP visualization embedding with community labels."}),"\n",(0,s.jsx)(n.h4,{id:"visualization",children:"visualization"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@save_state(model=VisualizationFunctionSchema)\ndef visualization(config: Union[str, Path],\n label: Optional[str] = None,\n save_logs: bool = False) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize UMAP embeddings based on configuration settings."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"label"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of labels to visualize. Default is None."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Plot Visualization of UMAP embeddings."})]})}function u(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>t});var s=i(6540);const l={},a=s.createContext(l);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/498287ba.d3292814.js b/assets/js/498287ba.d3292814.js new file mode 100644 index 00000000..07c72d8d --- /dev/null +++ b/assets/js/498287ba.d3292814.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3100],{7951:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var n=s(4848),a=s(8453);const r={sidebar_label:"states",title:"vame.schemas.states"},c=void 0,o={id:"reference/vame/schemas/states",title:"vame.schemas.states",description:"save\\_state",source:"@site/docs/reference/vame/schemas/states.md",sourceDirName:"reference/vame/schemas",slug:"/reference/vame/schemas/states",permalink:"/VAME/docs/reference/vame/schemas/states",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"states",title:"vame.schemas.states"},sidebar:"docsSidebar",previous:{title:"rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae"},next:{title:"align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical"}},i={},l=[{value:"save_state",id:"save_state",level:4}];function d(e){const t={code:"code",h4:"h4",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h4,{id:"save_state",children:"save_state"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"def save_state(model: BaseModel)\n"})}),"\n",(0,n.jsx)(t.p,{children:"Decorator responsible for validating function arguments using pydantic and\nsaving the state of the called function to the project states json file."})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>c,x:()=>o});var n=s(6540);const a={},r=n.createContext(a);function c(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5a083f91.10d2bdfe.js b/assets/js/5a083f91.10d2bdfe.js new file mode 100644 index 00000000..e517a046 --- /dev/null +++ b/assets/js/5a083f91.10d2bdfe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8816],{4829:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var i=t(4848),r=t(8453);const l={sidebar_label:"dataloader",title:"vame.model.dataloader"},s=void 0,d={id:"reference/vame/model/dataloader",title:"vame.model.dataloader",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/dataloader.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"dataloader",title:"vame.model.dataloader"},sidebar:"docsSidebar",previous:{title:"create_training",permalink:"/VAME/docs/reference/vame/model/create_training"},next:{title:"evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate"}},a={},c=[{value:"SEQUENCE_DATASET Objects",id:"sequence_dataset-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"__len__",id:"__len__",level:4},{value:"__getitem__",id:"__getitem__",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h2,{id:"sequence_dataset-objects",children:"SEQUENCE_DATASET Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class SEQUENCE_DATASET(Dataset)\n"})}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(path_to_file: str, data: str, train: bool, temporal_window: int,\n **kwargs) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Sequence Dataset."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path_to_file"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the dataset files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the data file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"train"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether it's training data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"temporal_window"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h4,{id:"__len__",children:"__len__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __len__() -> int\n"})}),"\n",(0,i.jsx)(n.p,{children:"Return the number of data points."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"int"})," - Number of data points."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"__getitem__",children:"__getitem__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __getitem__(index: int) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get a normalized sequence at the specified index."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"index"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the item."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Normalized sequence data at the specified index."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var i=t(6540);const r={},l=i.createContext(r);function s(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5a083f91.fff6d460.js b/assets/js/5a083f91.fff6d460.js deleted file mode 100644 index b5b984d4..00000000 --- a/assets/js/5a083f91.fff6d460.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8816],{4829:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>c});var i=t(4848),r=t(8453);const l={sidebar_label:"dataloader",title:"vame.model.dataloader"},s=void 0,d={id:"reference/vame/model/dataloader",title:"vame.model.dataloader",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/dataloader.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"dataloader",title:"vame.model.dataloader"},sidebar:"docsSidebar",previous:{title:"create_training",permalink:"/VAME/docs/reference/vame/model/create_training"},next:{title:"evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate"}},a={},c=[{value:"SEQUENCE_DATASET Objects",id:"sequence_dataset-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"__len__",id:"__len__",level:4},{value:"__getitem__",id:"__getitem__",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h2,{id:"sequence_dataset-objects",children:"SEQUENCE_DATASET Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class SEQUENCE_DATASET(Dataset)\n"})}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(path_to_file: str, data: str, train: bool,\n temporal_window: int) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Sequence Dataset."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path_to_file"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the dataset files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the data file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"train"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether it's training data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"temporal_window"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h4,{id:"__len__",children:"__len__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __len__() -> int\n"})}),"\n",(0,i.jsx)(n.p,{children:"Return the number of data points."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"int"})," - Number of data points."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"__getitem__",children:"__getitem__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __getitem__(index: int) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get a normalized sequence at the specified index."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"index"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the item."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Normalized sequence data at the specified index."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var i=t(6540);const r={},l=i.createContext(r);function s(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/62763787.a2324226.js b/assets/js/62763787.a2324226.js new file mode 100644 index 00000000..e39ab71c --- /dev/null +++ b/assets/js/62763787.a2324226.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4077],{689:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var s=i(4848),t=i(8453);const o={sidebar_label:"videowriter",title:"vame.analysis.videowriter"},r=void 0,l={id:"reference/vame/analysis/videowriter",title:"vame.analysis.videowriter",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/videowriter.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"videowriter",title:"vame.analysis.videowriter"},sidebar:"docsSidebar",previous:{title:"umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization"},next:{title:"new",permalink:"/VAME/docs/reference/vame/initialize_project/new"}},d={},c=[{value:"get_cluster_vid",id:"get_cluster_vid",level:4},{value:"motif_videos",id:"motif_videos",level:4},{value:"community_videos",id:"community_videos",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"get_cluster_vid",children:"get_cluster_vid"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def get_cluster_vid(cfg: dict,\n path_to_file: str,\n file: str,\n n_cluster: int,\n videoType: str,\n flag: str,\n output_video_type: str = ".mp4",\n tqdm_logger_stream: TqdmToLogger | None = None) -> None\n'})}),"\n",(0,s.jsx)(n.p,{children:"Generate cluster videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"path_to_file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Path to the file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str"})," - Type of input video."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"flag"})," ",(0,s.jsx)(n.em,{children:"str"})," - Flag indicating the type of video (motif or community)."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate cluster videos and save them to fs on project folder."}),"\n",(0,s.jsx)(n.h4,{id:"motif_videos",children:"motif_videos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@save_state(model=MotifVideosFunctionSchema)\ndef motif_videos(config: Union[str, Path],\n videoType: str = '.mp4',\n output_video_type: str = '.mp4',\n save_logs: bool = False) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate motif videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of video. Default is '.mp4'."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"output_video_type"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of output video. Default is '.mp4'."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate motif videos and save them to filesystem on project cluster_videos folder."}),"\n",(0,s.jsx)(n.h4,{id:"community_videos",children:"community_videos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@save_state(model=CommunityVideosFunctionSchema)\ndef community_videos(config: Union[str, Path],\n videoType: str = '.mp4',\n save_logs: bool = False) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate community videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of video. Default is '.mp4'."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate community videos and save them to filesystem on project community_videos folder."})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>l});var s=i(6540);const t={},o=s.createContext(t);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/62763787.cc06f169.js b/assets/js/62763787.cc06f169.js deleted file mode 100644 index f5ca5d04..00000000 --- a/assets/js/62763787.cc06f169.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4077],{689:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var s=i(4848),r=i(8453);const t={sidebar_label:"videowriter",title:"vame.analysis.videowriter"},o=void 0,l={id:"reference/vame/analysis/videowriter",title:"vame.analysis.videowriter",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/videowriter.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/videowriter",permalink:"/VAME/docs/reference/vame/analysis/videowriter",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"videowriter",title:"vame.analysis.videowriter"},sidebar:"docsSidebar",previous:{title:"umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization"},next:{title:"new",permalink:"/VAME/docs/reference/vame/initialize_project/new"}},c={},d=[{value:"get_cluster_vid",id:"get_cluster_vid",level:4},{value:"motif_videos",id:"motif_videos",level:4},{value:"community_videos",id:"community_videos",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"get_cluster_vid",children:"get_cluster_vid"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_cluster_vid(cfg: dict, path_to_file: str, file: str, n_cluster: int,\n videoType: str, flag: str) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate cluster videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"path_to_file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Path to the file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"file"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str"})," - Type of video."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"flag"})," ",(0,s.jsx)(n.em,{children:"str"})," - Flag indicating the type of video (motif or community)."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate cluster videos and save them to fs on project folder."}),"\n",(0,s.jsx)(n.h4,{id:"motif_videos",children:"motif_videos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def motif_videos(config: Union[str, Path], videoType: str = '.mp4') -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate motif videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of video. Default is '.mp4'."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate motif videos and save them to filesystem on project cluster_videos folder."}),"\n",(0,s.jsx)(n.h4,{id:"community_videos",children:"community_videos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def community_videos(config: Union[str, Path],\n videoType: str = '.mp4') -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate community videos."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"Union[str, Path]"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"videoType"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - Type of video. Default is '.mp4'."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None - Generate community videos and save them to filesystem on project community_videos folder."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var s=i(6540);const r={},t=s.createContext(r);function o(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/770df669.369213ba.js b/assets/js/770df669.369213ba.js new file mode 100644 index 00000000..87745db7 --- /dev/null +++ b/assets/js/770df669.369213ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9266],{5722:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>g,default:()=>d,frontMatter:()=>c,metadata:()=>i,toc:()=>s});var o=n(4848),r=n(8453);const c={sidebar_label:"logger",title:"vame.logging.logger"},g=void 0,i={id:"reference/vame/logging/logger",title:"vame.logging.logger",description:"TqdmToLogger Objects",source:"@site/docs/reference/vame/logging/logger.md",sourceDirName:"reference/vame/logging",slug:"/reference/vame/logging/logger",permalink:"/VAME/docs/reference/vame/logging/logger",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"logger",title:"vame.logging.logger"},sidebar:"docsSidebar",previous:{title:"new",permalink:"/VAME/docs/reference/vame/initialize_project/new"},next:{title:"create_training",permalink:"/VAME/docs/reference/vame/model/create_training"}},l={},s=[{value:"TqdmToLogger Objects",id:"tqdmtologger-objects",level:2}];function a(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"tqdmtologger-objects",children:"TqdmToLogger Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"class TqdmToLogger(io.StringIO)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Output stream for TQDM which will output to logger module instead of\nthe StdOut."})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>g,x:()=>i});var o=n(6540);const r={},c=o.createContext(r);function g(e){const t=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:g(e.components),o.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8adc0ad1.745fe039.js b/assets/js/8adc0ad1.745fe039.js deleted file mode 100644 index ae795d46..00000000 --- a/assets/js/8adc0ad1.745fe039.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8061],{3101:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>t,default:()=>a,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=s(4848),l=s(8453);const i={sidebar_label:"rnn_vae",title:"vame.model.rnn_vae"},t=void 0,c={id:"reference/vame/model/rnn_vae",title:"vame.model.rnn_vae",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/rnn_vae.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"rnn_vae",title:"vame.model.rnn_vae"},sidebar:"docsSidebar",previous:{title:"rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model"},next:{title:"align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical"}},o={},d=[{value:"reconstruction_loss",id:"reconstruction_loss",level:4},{value:"future_reconstruction_loss",id:"future_reconstruction_loss",level:4},{value:"cluster_loss",id:"cluster_loss",level:4},{value:"kullback_leibler_loss",id:"kullback_leibler_loss",level:4},{value:"kl_annealing",id:"kl_annealing",level:4},{value:"gaussian",id:"gaussian",level:4},{value:"train",id:"train",level:4},{value:"test",id:"test",level:4},{value:"train_model",id:"train_model",level:4}];function h(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"reconstruction_loss",children:"reconstruction_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def reconstruction_loss(x: torch.Tensor, x_tilde: torch.Tensor,\n reduction: str) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the reconstruction loss between input and reconstructed data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x_tilde"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Reconstructed data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"reduction"})," ",(0,r.jsx)(n.em,{children:"str"})," - Type of reduction for the loss."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Reconstruction loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"future_reconstruction_loss",children:"future_reconstruction_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def future_reconstruction_loss(x: torch.Tensor, x_tilde: torch.Tensor,\n reduction: str) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the future reconstruction loss between input and predicted future data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input future data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x_tilde"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Reconstructed future data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"reduction"})," ",(0,r.jsx)(n.em,{children:"str"})," - Type of reduction for the loss."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Future reconstruction loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"cluster_loss",children:"cluster_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def cluster_loss(H: torch.Tensor, kloss: int, lmbda: float,\n batch_size: int) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the cluster loss."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"H"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Latent representation tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kloss"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"lmbda"})," ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"batch_size"})," ",(0,r.jsx)(n.em,{children:"int"})," - Size of the batch."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Cluster loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"kullback_leibler_loss",children:"kullback_leibler_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def kullback_leibler_loss(mu: torch.Tensor,\n logvar: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Compute the Kullback-Leibler divergence loss.\nsee Appendix B from VAE paper: Kingma and Welling. Auto-Encoding Variational Bayes. ICLR, 2014 - ",(0,r.jsx)(n.a,{href:"https://arxiv.org/abs/1312.6114",children:"https://arxiv.org/abs/1312.6114"})]}),"\n",(0,r.jsx)(n.p,{children:"Formula: 0.5 * sum(1 + log(sigma^2) - mu^2 - sigma^2)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mu"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Mean of the latent distribution."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"logvar"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Log variance of the latent distribution."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Kullback-Leibler divergence loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"kl_annealing",children:"kl_annealing"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def kl_annealing(epoch: int, kl_start: int, annealtime: int,\n function: str) -> float\n"})}),"\n",(0,r.jsx)(n.p,{children:"Anneal the Kullback-Leibler loss to let the model learn first the reconstruction of the data\nbefore the KL loss term gets introduced."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Epoch number to start annealing the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"annealtime"})," ",(0,r.jsx)(n.em,{children:"int"})," - Annealing time."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"function"})," ",(0,r.jsx)(n.em,{children:"str"})," - Annealing function type."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"float"})," - Annealed weight value for the loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"gaussian",children:"gaussian"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def gaussian(ins: torch.Tensor,\n is_training: bool,\n seq_len: int,\n std_n: float = 0.8) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Add Gaussian noise to the input data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ins"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"is_training"})," ",(0,r.jsx)(n.em,{children:"bool"})," - Whether it is training mode."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"std_n"})," ",(0,r.jsx)(n.em,{children:"float"})," - Standard deviation for the Gaussian noise."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Noisy input data tensor."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"train",children:"train"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def train(train_loader: Data.DataLoader, epoch: int, model: nn.Module,\n optimizer: torch.optim.Optimizer, anneal_function: str, BETA: float,\n kl_start: int, annealtime: int, seq_len: int, future_decoder: bool,\n future_steps: int, scheduler: torch.optim.lr_scheduler._LRScheduler,\n mse_red: str, mse_pred: str, kloss: int, klmbda: float, bsize: int,\n noise: bool) -> Tuple[float, float, float, float, float, float]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Train the model."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"train_loader"})," ",(0,r.jsx)(n.em,{children:"DataLoader"})," - Training data loader."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"model"})," ",(0,r.jsx)(n.em,{children:"nn.Module"})," - Model to be trained."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"optimizer"})," ",(0,r.jsx)(n.em,{children:"Optimizer"})," - Optimizer for training."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"anneal_function"})," ",(0,r.jsx)(n.em,{children:"str"})," - Annealing function type."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"BETA"})," ",(0,r.jsx)(n.em,{children:"float"})," - Beta value for the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Epoch number to start annealing the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"annealtime"})," ",(0,r.jsx)(n.em,{children:"int"})," - Annealing time."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"future_decoder"})," ",(0,r.jsx)(n.em,{children:"bool"})," - Whether a future decoder is used."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"0 ",(0,r.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"1 _lr_scheduler.",(0,r.jsx)(n.em,{children:"LRScheduler"})," - Learning rate scheduler."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"2 ",(0,r.jsx)(n.em,{children:"str"})," - Reduction type for MSE reconstruction loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"3 ",(0,r.jsx)(n.em,{children:"str"})," - Reduction type for MSE prediction loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"4 ",(0,r.jsx)(n.em,{children:"int"})," - Number of clusters for cluster loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"5 ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for cluster loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"6 ",(0,r.jsx)(n.em,{children:"int"})," - Size of the batch."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"7 ",(0,r.jsx)(n.em,{children:"bool"})," - Whether to add Gaussian noise to the input."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[float, float, float, float, float, float]: Kullback-Leibler weight, train loss, K-means loss, KL loss,\nMSE loss, future loss."}),"\n",(0,r.jsx)(n.h4,{id:"test",children:"test"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def test(test_loader: Data.DataLoader, epoch: int, model: nn.Module,\n optimizer: torch.optim.Optimizer, BETA: float, kl_weight: float,\n seq_len: int, mse_red: str, kloss: str, klmbda: float,\n future_decoder: bool, bsize: int) -> Tuple[float, float, float]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Evaluate the model on the test dataset."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"test_loader"})," ",(0,r.jsx)(n.em,{children:"DataLoader"})," - DataLoader for the test dataset."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int, deprecated"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"model"})," ",(0,r.jsx)(n.em,{children:"nn.Module"})," - The trained model."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"optimizer"})," ",(0,r.jsx)(n.em,{children:"Optimizer, deprecated"})," - The optimizer used for training."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"BETA"})," ",(0,r.jsx)(n.em,{children:"float"})," - Beta value for the VAE loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_weight"})," ",(0,r.jsx)(n.em,{children:"float"})," - Weighting factor for the KL divergence loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mse_red"})," ",(0,r.jsx)(n.em,{children:"str"})," - Reduction method for the MSE loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kloss"})," ",(0,r.jsx)(n.em,{children:"str"})," - Loss function for K-means clustering."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"klmbda"})," ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for K-means loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"0 ",(0,r.jsx)(n.em,{children:"bool"})," - Flag indicating whether to use a future decoder."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"1 ",(0,r.jsx)(n.em,{children:"int"})," - Batch size."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[float, float, float]: Tuple containing MSE loss per item, total test loss per item,\nand K-means loss weighted by the kl_weight."}),"\n",(0,r.jsx)(n.h4,{id:"train_model",children:"train_model"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def train_model(config: str) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Train Variational Autoencoder using the configuration file values."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var r=s(6540);const l={},i=r.createContext(l);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8adc0ad1.7c81efb2.js b/assets/js/8adc0ad1.7c81efb2.js new file mode 100644 index 00000000..509c1a67 --- /dev/null +++ b/assets/js/8adc0ad1.7c81efb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8061],{3101:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>t,default:()=>a,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=s(4848),l=s(8453);const i={sidebar_label:"rnn_vae",title:"vame.model.rnn_vae"},t=void 0,c={id:"reference/vame/model/rnn_vae",title:"vame.model.rnn_vae",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/rnn_vae.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"rnn_vae",title:"vame.model.rnn_vae"},sidebar:"docsSidebar",previous:{title:"rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model"},next:{title:"states",permalink:"/VAME/docs/reference/vame/schemas/states"}},o={},d=[{value:"reconstruction_loss",id:"reconstruction_loss",level:4},{value:"future_reconstruction_loss",id:"future_reconstruction_loss",level:4},{value:"cluster_loss",id:"cluster_loss",level:4},{value:"kullback_leibler_loss",id:"kullback_leibler_loss",level:4},{value:"kl_annealing",id:"kl_annealing",level:4},{value:"gaussian",id:"gaussian",level:4},{value:"train",id:"train",level:4},{value:"test",id:"test",level:4},{value:"train_model",id:"train_model",level:4}];function h(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"reconstruction_loss",children:"reconstruction_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def reconstruction_loss(x: torch.Tensor, x_tilde: torch.Tensor,\n reduction: str) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the reconstruction loss between input and reconstructed data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x_tilde"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Reconstructed data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"reduction"})," ",(0,r.jsx)(n.em,{children:"str"})," - Type of reduction for the loss."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Reconstruction loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"future_reconstruction_loss",children:"future_reconstruction_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def future_reconstruction_loss(x: torch.Tensor, x_tilde: torch.Tensor,\n reduction: str) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the future reconstruction loss between input and predicted future data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input future data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"x_tilde"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Reconstructed future data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"reduction"})," ",(0,r.jsx)(n.em,{children:"str"})," - Type of reduction for the loss."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Future reconstruction loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"cluster_loss",children:"cluster_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def cluster_loss(H: torch.Tensor, kloss: int, lmbda: float,\n batch_size: int) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the cluster loss."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"H"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Latent representation tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kloss"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"lmbda"})," ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"batch_size"})," ",(0,r.jsx)(n.em,{children:"int"})," - Size of the batch."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Cluster loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"kullback_leibler_loss",children:"kullback_leibler_loss"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def kullback_leibler_loss(mu: torch.Tensor,\n logvar: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Compute the Kullback-Leibler divergence loss.\nsee Appendix B from VAE paper: Kingma and Welling. Auto-Encoding Variational Bayes. ICLR, 2014 - ",(0,r.jsx)(n.a,{href:"https://arxiv.org/abs/1312.6114",children:"https://arxiv.org/abs/1312.6114"})]}),"\n",(0,r.jsx)(n.p,{children:"Formula: 0.5 * sum(1 + log(sigma^2) - mu^2 - sigma^2)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mu"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Mean of the latent distribution."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"logvar"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Log variance of the latent distribution."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Kullback-Leibler divergence loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"kl_annealing",children:"kl_annealing"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def kl_annealing(epoch: int, kl_start: int, annealtime: int,\n function: str) -> float\n"})}),"\n",(0,r.jsx)(n.p,{children:"Anneal the Kullback-Leibler loss to let the model learn first the reconstruction of the data\nbefore the KL loss term gets introduced."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Epoch number to start annealing the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"annealtime"})," ",(0,r.jsx)(n.em,{children:"int"})," - Annealing time."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"function"})," ",(0,r.jsx)(n.em,{children:"str"})," - Annealing function type."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"float"})," - Annealed weight value for the loss."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"gaussian",children:"gaussian"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def gaussian(ins: torch.Tensor,\n is_training: bool,\n seq_len: int,\n std_n: float = 0.8) -> torch.Tensor\n"})}),"\n",(0,r.jsx)(n.p,{children:"Add Gaussian noise to the input data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ins"})," ",(0,r.jsx)(n.em,{children:"torch.Tensor"})," - Input data tensor."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"is_training"})," ",(0,r.jsx)(n.em,{children:"bool"})," - Whether it is training mode."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"std_n"})," ",(0,r.jsx)(n.em,{children:"float"})," - Standard deviation for the Gaussian noise."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"torch.Tensor"})," - Noisy input data tensor."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"train",children:"train"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def train(train_loader: Data.DataLoader, epoch: int, model: nn.Module,\n optimizer: torch.optim.Optimizer, anneal_function: str, BETA: float,\n kl_start: int, annealtime: int, seq_len: int, future_decoder: bool,\n future_steps: int, scheduler: torch.optim.lr_scheduler._LRScheduler,\n mse_red: str, mse_pred: str, kloss: int, klmbda: float, bsize: int,\n noise: bool) -> Tuple[float, float, float, float, float, float]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Train the model."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"train_loader"})," ",(0,r.jsx)(n.em,{children:"DataLoader"})," - Training data loader."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"model"})," ",(0,r.jsx)(n.em,{children:"nn.Module"})," - Model to be trained."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"optimizer"})," ",(0,r.jsx)(n.em,{children:"Optimizer"})," - Optimizer for training."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"anneal_function"})," ",(0,r.jsx)(n.em,{children:"str"})," - Annealing function type."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"BETA"})," ",(0,r.jsx)(n.em,{children:"float"})," - Beta value for the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_start"})," ",(0,r.jsx)(n.em,{children:"int"})," - Epoch number to start annealing the loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"annealtime"})," ",(0,r.jsx)(n.em,{children:"int"})," - Annealing time."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"future_decoder"})," ",(0,r.jsx)(n.em,{children:"bool"})," - Whether a future decoder is used."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"0 ",(0,r.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"1 _lr_scheduler.",(0,r.jsx)(n.em,{children:"LRScheduler"})," - Learning rate scheduler."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"2 ",(0,r.jsx)(n.em,{children:"str"})," - Reduction type for MSE reconstruction loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"3 ",(0,r.jsx)(n.em,{children:"str"})," - Reduction type for MSE prediction loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"4 ",(0,r.jsx)(n.em,{children:"int"})," - Number of clusters for cluster loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"5 ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for cluster loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"6 ",(0,r.jsx)(n.em,{children:"int"})," - Size of the batch."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"7 ",(0,r.jsx)(n.em,{children:"bool"})," - Whether to add Gaussian noise to the input."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[float, float, float, float, float, float]: Kullback-Leibler weight, train loss, K-means loss, KL loss,\nMSE loss, future loss."}),"\n",(0,r.jsx)(n.h4,{id:"test",children:"test"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def test(test_loader: Data.DataLoader, epoch: int, model: nn.Module,\n optimizer: torch.optim.Optimizer, BETA: float, kl_weight: float,\n seq_len: int, mse_red: str, kloss: str, klmbda: float,\n future_decoder: bool, bsize: int) -> Tuple[float, float, float]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Evaluate the model on the test dataset."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"test_loader"})," ",(0,r.jsx)(n.em,{children:"DataLoader"})," - DataLoader for the test dataset."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"})," ",(0,r.jsx)(n.em,{children:"int, deprecated"})," - Current epoch number."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"model"})," ",(0,r.jsx)(n.em,{children:"nn.Module"})," - The trained model."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"optimizer"})," ",(0,r.jsx)(n.em,{children:"Optimizer, deprecated"})," - The optimizer used for training."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"BETA"})," ",(0,r.jsx)(n.em,{children:"float"})," - Beta value for the VAE loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kl_weight"})," ",(0,r.jsx)(n.em,{children:"float"})," - Weighting factor for the KL divergence loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"seq_len"})," ",(0,r.jsx)(n.em,{children:"int"})," - Length of the sequence."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mse_red"})," ",(0,r.jsx)(n.em,{children:"str"})," - Reduction method for the MSE loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"kloss"})," ",(0,r.jsx)(n.em,{children:"str"})," - Loss function for K-means clustering."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"klmbda"})," ",(0,r.jsx)(n.em,{children:"float"})," - Lambda value for K-means loss."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"0 ",(0,r.jsx)(n.em,{children:"bool"})," - Flag indicating whether to use a future decoder."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epoch"}),"1 ",(0,r.jsx)(n.em,{children:"int"})," - Batch size."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[float, float, float]: Tuple containing MSE loss per item, total test loss per item,\nand K-means loss weighted by the kl_weight."}),"\n",(0,r.jsx)(n.h4,{id:"train_model",children:"train_model"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"@save_state(model=TrainModelFunctionSchema)\ndef train_model(config: str, save_logs: bool = False) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Train Variational Autoencoder using the configuration file values."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var r=s(6540);const l={},i=r.createContext(l);function t(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/97262fb0.97042976.js b/assets/js/97262fb0.97042976.js deleted file mode 100644 index 7fa3554f..00000000 --- a/assets/js/97262fb0.97042976.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4841],{2383:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>t,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var r=i(4848),l=i(8453);const s={sidebar_label:"align_egocentrical",title:"vame.util.align_egocentrical"},d=void 0,c={id:"reference/vame/util/align_egocentrical",title:"vame.util.align_egocentrical",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/util/align_egocentrical.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"align_egocentrical",title:"vame.util.align_egocentrical"},sidebar:"docsSidebar",previous:{title:"rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae"},next:{title:"auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary"}},t={},o=[{value:"crop_and_flip",id:"crop_and_flip",level:4},{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"background",id:"background",level:4},{value:"align_mouse",id:"align_mouse",level:4},{value:"play_aligned_video",id:"play_aligned_video",level:4},{value:"alignment",id:"alignment",level:4},{value:"egocentric_alignment",id:"egocentric_alignment",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & J. K\xfcrsch & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"crop_and_flip",children:"crop_and_flip"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def crop_and_flip(\n rect: Tuple, src: np.ndarray, points: List[np.ndarray],\n ref_index: Tuple[int, int]) -> Tuple[np.ndarray, List[np.ndarray]]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Crop and flip the image based on the given rectangle and points."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"rect"})," ",(0,r.jsx)(n.em,{children:"Tuple"})," - Rectangle coordinates (center, size, theta)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"src"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Source image."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"points"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of points."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ref_index"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Reference indices for alignment."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, List[np.ndarray]]: Cropped and flipped image, and shifted points."}),"\n",(0,r.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Helper function to identify NaN values in an array."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"y"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: Boolean mask for NaN values and function to interpolate them."}),"\n",(0,r.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,r.jsx)(n.p,{children:"Interpolates NaN values in the given array."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"arr"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"np.ndarray"})," - Array with interpolated NaN values."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"background",children:"background"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def background(path_to_file: str,\n filename: str,\n video_format: str = '.mp4',\n num_frames: int = 1000) -> np.ndarray\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the background image from a fixed camera."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"num_frames"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Number of frames to use for background computation. Defaults to 1000."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"np.ndarray"})," - Background image."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"align_mouse",children:"align_mouse"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def align_mouse(\n path_to_file: str,\n filename: str,\n video_format: str,\n crop_size: Tuple[int, int],\n pose_list: List[np.ndarray],\n pose_ref_index: Tuple[int, int],\n confidence: float,\n pose_flip_ref: Tuple[int, int],\n bg: np.ndarray,\n frame_count: int,\n use_video: bool = True\n) -> Tuple[List[np.ndarray], List[List[np.ndarray]], np.ndarray]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Align the mouse in the video frames."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str"})," - Format of the video file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Size to crop the video frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_list"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of pose coordinates."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Pose reference indices."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"confidence"})," ",(0,r.jsx)(n.em,{children:"float"})," - Pose confidence threshold."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_flip_ref"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Reference indices for flipping."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"bg"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Background image."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frame_count"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of frames to align."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"}),"0 ",(0,r.jsx)(n.em,{children:"bool, optional"})," - bool if video should be cropped or DLC points only. Defaults to True."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[List[np.ndarray], List[List[np.ndarray]], np.ndarray]: List of aligned images, list of aligned DLC points, and time series data."}),"\n",(0,r.jsx)(n.h4,{id:"play_aligned_video",children:"play_aligned_video"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def play_aligned_video(a: List[np.ndarray], n: List[List[np.ndarray]],\n frame_count: int) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Play the aligned video."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"a"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of aligned images."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"n"})," ",(0,r.jsx)(n.em,{children:"List[List[np.ndarray]]"})," - List of aligned DLC points."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frame_count"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of frames in the video."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"alignment",children:"alignment"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def alignment(\n path_to_file: str,\n filename: str,\n pose_ref_index: List[int],\n video_format: str,\n crop_size: Tuple[int, int],\n confidence: float,\n use_video: bool = False,\n check_video: bool = False) -> Tuple[np.ndarray, List[np.ndarray]]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Perform alignment of egocentric data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"List[int]"})," - Pose reference indices."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str"})," - Format of the video file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Size to crop the video frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"confidence"})," ",(0,r.jsx)(n.em,{children:"float"})," - Pose confidence threshold."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"use_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to use video for alignment. Defaults to False."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"check_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to check the aligned video. Defaults to False."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, List[np.ndarray]]: Aligned time series data and list of aligned frames."}),"\n",(0,r.jsx)(n.h4,{id:"egocentric_alignment",children:"egocentric_alignment"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def egocentric_alignment(config: str,\n pose_ref_index: list = [5, 6],\n crop_size: tuple = (300, 300),\n use_video: bool = False,\n video_format: str = '.mp4',\n check_video: bool = False) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Aligns egocentric data for VAME training"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path for the project config file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"list, optional"})," - Pose reference index to be used to align. Defaults to [5,6]."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"tuple, optional"})," - Size to crop the video. Defaults to (300,300)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"use_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Weather to use video to do the post alignment. Defaults to False. # TODO check what to put in this docstring"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Video format, can be .mp4 or .avi. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"check_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Weather to check the video. Defaults to False."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ValueError"})," - If the config.yaml indicates that the data is not egocentric."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>d,x:()=>c});var r=i(6540);const l={},s=r.createContext(l);function d(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:d(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/97262fb0.b807bf4e.js b/assets/js/97262fb0.b807bf4e.js new file mode 100644 index 00000000..82b3ae9e --- /dev/null +++ b/assets/js/97262fb0.b807bf4e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4841],{2383:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>t,toc:()=>c});var r=i(4848),l=i(8453);const s={sidebar_label:"align_egocentrical",title:"vame.util.align_egocentrical"},d=void 0,t={id:"reference/vame/util/align_egocentrical",title:"vame.util.align_egocentrical",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/util/align_egocentrical.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/align_egocentrical",permalink:"/VAME/docs/reference/vame/util/align_egocentrical",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"align_egocentrical",title:"vame.util.align_egocentrical"},sidebar:"docsSidebar",previous:{title:"states",permalink:"/VAME/docs/reference/vame/schemas/states"},next:{title:"auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary"}},o={},c=[{value:"crop_and_flip",id:"crop_and_flip",level:4},{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"background",id:"background",level:4},{value:"align_mouse",id:"align_mouse",level:4},{value:"play_aligned_video",id:"play_aligned_video",level:4},{value:"alignment",id:"alignment",level:4},{value:"egocentric_alignment",id:"egocentric_alignment",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & J. K\xfcrsch & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,r.jsx)(n.h4,{id:"crop_and_flip",children:"crop_and_flip"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def crop_and_flip(\n rect: Tuple, src: np.ndarray, points: List[np.ndarray],\n ref_index: Tuple[int, int]) -> Tuple[np.ndarray, List[np.ndarray]]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Crop and flip the image based on the given rectangle and points."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"rect"})," ",(0,r.jsx)(n.em,{children:"Tuple"})," - Rectangle coordinates (center, size, theta)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"src"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Source image."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"points"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of points."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ref_index"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Reference indices for alignment."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, List[np.ndarray]]: Cropped and flipped image, and shifted points."}),"\n",(0,r.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Helper function to identify NaN values in an array."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"y"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: Boolean mask for NaN values and function to interpolate them."}),"\n",(0,r.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,r.jsx)(n.p,{children:"Interpolates NaN values in the given array."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"arr"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"np.ndarray"})," - Array with interpolated NaN values."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"background",children:"background"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def background(path_to_file: str,\n filename: str,\n video_format: str = '.mp4',\n num_frames: int = 1000) -> np.ndarray\n"})}),"\n",(0,r.jsx)(n.p,{children:"Compute the background image from a fixed camera."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"num_frames"})," ",(0,r.jsx)(n.em,{children:"int, optional"})," - Number of frames to use for background computation. Defaults to 1000."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"np.ndarray"})," - Background image."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"align_mouse",children:"align_mouse"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def align_mouse(\n path_to_file: str,\n filename: str,\n video_format: str,\n crop_size: Tuple[int, int],\n pose_list: List[np.ndarray],\n pose_ref_index: Tuple[int, int],\n confidence: float,\n pose_flip_ref: Tuple[int, int],\n bg: np.ndarray,\n frame_count: int,\n use_video: bool = True,\n tqdm_stream: TqdmToLogger = None\n) -> Tuple[List[np.ndarray], List[List[np.ndarray]], np.ndarray]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Align the mouse in the video frames."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str"})," - Format of the video file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Size to crop the video frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_list"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of pose coordinates."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Pose reference indices."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"confidence"})," ",(0,r.jsx)(n.em,{children:"float"})," - Pose confidence threshold."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_flip_ref"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Reference indices for flipping."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"bg"})," ",(0,r.jsx)(n.em,{children:"np.ndarray"})," - Background image."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frame_count"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of frames to align."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"}),"0 ",(0,r.jsx)(n.em,{children:"bool, optional"})," - bool if video should be cropped or DLC points only. Defaults to True."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[List[np.ndarray], List[List[np.ndarray]], np.ndarray]: List of aligned images, list of aligned DLC points, and time series data."}),"\n",(0,r.jsx)(n.h4,{id:"play_aligned_video",children:"play_aligned_video"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def play_aligned_video(a: List[np.ndarray], n: List[List[np.ndarray]],\n frame_count: int) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Play the aligned video."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"a"})," ",(0,r.jsx)(n.em,{children:"List[np.ndarray]"})," - List of aligned images."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"n"})," ",(0,r.jsx)(n.em,{children:"List[List[np.ndarray]]"})," - List of aligned DLC points."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"frame_count"})," ",(0,r.jsx)(n.em,{children:"int"})," - Number of frames in the video."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"alignment",children:"alignment"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def alignment(\n path_to_file: str,\n filename: str,\n pose_ref_index: List[int],\n video_format: str,\n crop_size: Tuple[int, int],\n confidence: float,\n use_video: bool = False,\n check_video: bool = False,\n tqdm_stream: TqdmToLogger = None\n) -> Tuple[np.ndarray, List[np.ndarray]]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Perform alignment of egocentric data."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"path_to_file"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path to the file directory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - Name of the video file without the format."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"List[int]"})," - Pose reference indices."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str"})," - Format of the video file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"Tuple[int, int]"})," - Size to crop the video frames."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"confidence"})," ",(0,r.jsx)(n.em,{children:"float"})," - Pose confidence threshold."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"use_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to use video for alignment. Defaults to False."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"check_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to check the aligned video. Defaults to False."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[np.ndarray, List[np.ndarray]]: Aligned time series data and list of aligned frames."}),"\n",(0,r.jsx)(n.h4,{id:"egocentric_alignment",children:"egocentric_alignment"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"@save_state(model=EgocentricAlignmentFunctionSchema)\ndef egocentric_alignment(config: str,\n pose_ref_index: list = [5, 6],\n crop_size: tuple = (300, 300),\n use_video: bool = False,\n video_format: str = '.mp4',\n check_video: bool = False,\n save_logs: bool = False) -> None\n"})}),"\n",(0,r.jsx)(n.p,{children:"Aligns egocentric data for VAME training"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"config"})," ",(0,r.jsx)(n.em,{children:"str"})," - Path for the project config file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pose_ref_index"})," ",(0,r.jsx)(n.em,{children:"list, optional"})," - Pose reference index to be used to align. Defaults to [5,6]."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"crop_size"})," ",(0,r.jsx)(n.em,{children:"tuple, optional"})," - Size to crop the video. Defaults to (300,300)."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"use_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Weather to use video to do the post alignment. Defaults to False. # TODO check what to put in this docstring"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"video_format"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - Video format, can be .mp4 or .avi. Defaults to '.mp4'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"check_video"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Weather to check the video. Defaults to False."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ValueError"})," - If the config.yaml indicates that the data is not egocentric."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>d,x:()=>t});var r=i(6540);const l={},s=r.createContext(l);function d(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:d(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/99e0554e.8491f3b4.js b/assets/js/99e0554e.eb39250f.js similarity index 83% rename from assets/js/99e0554e.8491f3b4.js rename to assets/js/99e0554e.eb39250f.js index c10b156d..df2ac835 100644 --- a/assets/js/99e0554e.8491f3b4.js +++ b/assets/js/99e0554e.eb39250f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4641],{5733:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>t});var s=r(4848),l=r(8453);const i={sidebar_label:"generative_functions",title:"vame.analysis.generative_functions"},c=void 0,d={id:"reference/vame/analysis/generative_functions",title:"vame.analysis.generative_functions",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/generative_functions.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"generative_functions",title:"vame.analysis.generative_functions"},sidebar:"docsSidebar",previous:{title:"community_analysis",permalink:"/VAME/docs/reference/vame/analysis/community_analysis"},next:{title:"gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator"}},o={},t=[{value:"random_generative_samples_motif",id:"random_generative_samples_motif",level:4},{value:"random_generative_samples",id:"random_generative_samples",level:4},{value:"random_reconstruction_samples",id:"random_reconstruction_samples",level:4},{value:"visualize_cluster_center",id:"visualize_cluster_center",level:4},{value:"load_model",id:"load_model",level:4},{value:"generative_model",id:"generative_model",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"random_generative_samples_motif",children:"random_generative_samples_motif"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_generative_samples_motif(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray,\n labels: np.ndarray,\n n_cluster: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random samples for motifs."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"labels"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"None"})," - Plot of generated samples."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"random_generative_samples",children:"random_generative_samples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_generative_samples(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random generative samples."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"random_reconstruction_samples",children:"random_reconstruction_samples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_reconstruction_samples(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random reconstruction samples."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model to use."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"visualize_cluster_center",children:"visualize_cluster_center"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def visualize_cluster_center(cfg: dict, model: torch.nn.Module,\n cluster_center: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize cluster centers."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cluster_center"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Cluster centers."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"load_model",children:"load_model"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def load_model(cfg: dict, model_name: str) -> torch.nn.Module\n"})}),"\n",(0,s.jsx)(n.p,{children:"Load PyTorch model."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model_name"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"torch.nn.Module"})," - Loaded PyTorch model."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"generative_model",children:"generative_model"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def generative_model(config: str, mode: str = "sampling") -> None\n'})}),"\n",(0,s.jsx)(n.p,{children:"Generative model."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mode"})," ",(0,s.jsx)(n.em,{children:"str, optional"}),' - Mode for generating samples. Defaults to "sampling".']}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>d});var s=r(6540);const l={},i=s.createContext(l);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4641],{5733:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>t});var s=r(4848),l=r(8453);const i={sidebar_label:"generative_functions",title:"vame.analysis.generative_functions"},c=void 0,d={id:"reference/vame/analysis/generative_functions",title:"vame.analysis.generative_functions",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/generative_functions.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"generative_functions",title:"vame.analysis.generative_functions"},sidebar:"docsSidebar",previous:{title:"community_analysis",permalink:"/VAME/docs/reference/vame/analysis/community_analysis"},next:{title:"gif_creator",permalink:"/VAME/docs/reference/vame/analysis/gif_creator"}},o={},t=[{value:"random_generative_samples_motif",id:"random_generative_samples_motif",level:4},{value:"random_generative_samples",id:"random_generative_samples",level:4},{value:"random_reconstruction_samples",id:"random_reconstruction_samples",level:4},{value:"visualize_cluster_center",id:"visualize_cluster_center",level:4},{value:"load_model",id:"load_model",level:4},{value:"generative_model",id:"generative_model",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"random_generative_samples_motif",children:"random_generative_samples_motif"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_generative_samples_motif(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray,\n labels: np.ndarray,\n n_cluster: int) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random samples for motifs."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"labels"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Labels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"None"})," - Plot of generated samples."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"random_generative_samples",children:"random_generative_samples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_generative_samples(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random generative samples."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"random_reconstruction_samples",children:"random_reconstruction_samples"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def random_reconstruction_samples(cfg: dict, model: torch.nn.Module,\n latent_vector: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate random reconstruction samples."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model to use."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"latent_vector"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Latent vectors."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"visualize_cluster_center",children:"visualize_cluster_center"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def visualize_cluster_center(cfg: dict, model: torch.nn.Module,\n cluster_center: np.ndarray) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visualize cluster centers."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model"})," ",(0,s.jsx)(n.em,{children:"torch.nn.Module"})," - PyTorch model."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cluster_center"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - Cluster centers."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"load_model",children:"load_model"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def load_model(cfg: dict, model_name: str) -> torch.nn.Module\n"})}),"\n",(0,s.jsx)(n.p,{children:"Load PyTorch model."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cfg"})," ",(0,s.jsx)(n.em,{children:"dict"})," - Configuration dictionary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"model_name"})," ",(0,s.jsx)(n.em,{children:"str"})," - Name of the model."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"torch.nn.Module"})," - Loaded PyTorch model."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"generative_model",children:"generative_model"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'@save_state(model=GenerativeModelFunctionSchema)\ndef generative_model(config: str,\n mode: str = "sampling",\n save_logs: bool = False) -> plt.Figure\n'})}),"\n",(0,s.jsx)(n.p,{children:"Generative model."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"config"})," ",(0,s.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mode"})," ",(0,s.jsx)(n.em,{children:"str, optional"}),' - Mode for generating samples. Defaults to "sampling".']}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"plt.Figure"})," - Plot of generated samples."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>d});var s=r(6540);const l={},i=s.createContext(l);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a54c3d34.6e513b18.js b/assets/js/a54c3d34.11b56e83.js similarity index 86% rename from assets/js/a54c3d34.6e513b18.js rename to assets/js/a54c3d34.11b56e83.js index 542d3a2b..b687b78d 100644 --- a/assets/js/a54c3d34.6e513b18.js +++ b/assets/js/a54c3d34.11b56e83.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1470],{617:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var i=s(4848),r=s(8453);const l={sidebar_label:"community_analysis",title:"vame.analysis.community_analysis"},t=void 0,c={id:"reference/vame/analysis/community_analysis",title:"vame.analysis.community_analysis",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/community_analysis.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/community_analysis",permalink:"/VAME/docs/reference/vame/analysis/community_analysis",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"community_analysis",title:"vame.analysis.community_analysis"},sidebar:"docsSidebar",previous:{title:"API reference",permalink:"/VAME/docs/category/api-reference"},next:{title:"generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions"}},a={},d=[{value:"get_adjacency_matrix",id:"get_adjacency_matrix",level:4},{value:"get_transition_matrix",id:"get_transition_matrix",level:4},{value:"consecutive",id:"consecutive",level:4},{value:"find_zero_labels",id:"find_zero_labels",level:4},{value:"augment_motif_timeseries",id:"augment_motif_timeseries",level:4},{value:"get_labels",id:"get_labels",level:4},{value:"get_community_label",id:"get_community_label",level:4},{value:"compute_transition_matrices",id:"compute_transition_matrices",level:4},{value:"create_community_bag",id:"create_community_bag",level:4},{value:"create_cohort_community_bag",id:"create_cohort_community_bag",level:4},{value:"get_community_labels",id:"get_community_labels",level:4},{value:"get_cohort_community_labels",id:"get_cohort_community_labels",level:4},{value:"umap_embedding",id:"umap_embedding",level:4},{value:"umap_vis",id:"umap_vis",level:4},{value:"community",id:"community",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xc2\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.p,{children:"Updated 5/11/2022 with PH edits"}),"\n",(0,i.jsx)(n.h4,{id:"get_adjacency_matrix",children:"get_adjacency_matrix"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_adjacency_matrix(\n labels: np.ndarray,\n n_cluster: int) -> Tuple[np.ndarray, np.ndarray, np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Calculate the adjacency matrix, transition matrix, and temporal matrix."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Array of cluster labels."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray, np.ndarray]: Tuple containing adjacency matrix, transition matrix, and temporal matrix."}),"\n",(0,i.jsx)(n.h4,{id:"get_transition_matrix",children:"get_transition_matrix"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_transition_matrix(adjacency_matrix: np.ndarray,\n threshold: float = 0.0) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute the transition matrix from the adjacency matrix."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"adjacency_matrix"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Adjacency matrix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"threshold"})," ",(0,i.jsx)(n.em,{children:"float, optional"})," - Threshold for considering transitions. Defaults to 0.0."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Transition matrix."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"consecutive",children:"consecutive"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies location of missing motif finding consecutive elements in an array and returns array(s) at the split."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"stepsize"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Step size. Defaults to 1."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of arrays containing consecutive elements."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"find_zero_labels",children:"find_zero_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def find_zero_labels(motif_usage: Tuple[np.ndarray, np.ndarray],\n n_cluster: int) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find zero labels in motif usage and fill them."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"motif_usage"})," ",(0,i.jsx)(n.em,{children:"Tuple[np.ndarray, np.ndarray]"})," - 2D list where the first index is a unique list of motif used and the second index is the motif usage in frames."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - List of motif usage frames with 0's where motifs weren't used (array with zero labels filled)."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"augment_motif_timeseries",children:"augment_motif_timeseries"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def augment_motif_timeseries(label: np.ndarray,\n n_cluster: int) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Augment motif time series by filling zero motifs."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"label"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Original label array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: Augmented label array and indices of zero motifs."}),"\n",(0,i.jsx)(n.h4,{id:"get_labels",children:"get_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_labels(cfg: dict, files: List[str], model_name: str, n_cluster: int,\n parametrization: str) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get cluster labels for given videos files."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of video files paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of cluster labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_community_label",children:"get_community_label"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_community_label(cfg: dict, files: List[str], model_name: str,\n n_cluster: int, parametrization: str) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get community labels for given files."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array of community labels."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"compute_transition_matrices",children:"compute_transition_matrices"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def compute_transition_matrices(files: List[str], labels: List[np.ndarray],\n n_cluster: int) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute transition matrices for given files and labels."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of transition matrices."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"create_community_bag",children:"create_community_bag"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def create_community_bag(files: List[str], labels: List[np.ndarray],\n transition_matrices: List[np.ndarray], cut_tree: int,\n n_cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create community bag for given files and labels (Markov chain to tree -> community detection)."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"transition_matrices"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of transition matrices."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int"})," - Cut line for tree."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple containing list of community bags and list of trees."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"create_cohort_community_bag",children:"create_cohort_community_bag"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def create_cohort_community_bag(files: List[str], labels: List[np.ndarray],\n trans_mat_full: np.ndarray, cut_tree: int,\n n_cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create cohort community bag for given labels, transition matrix, cut tree, and number of clusters.\n(markov chain to tree -> community detection)"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files paths (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"trans_mat_full"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Full transition matrix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int"})," - Cut line for tree."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple containing list of community bags and list of trees."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_community_labels",children:"get_community_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_community_labels(\n files: List[str], labels: List[np.ndarray],\n communities_all: List[List[List[int]]]) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Transform kmeans parameterized latent vector into communities. Get community labels for given files and community bags."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"communities_all"})," ",(0,i.jsx)(n.em,{children:"List[List[List[int]]]"})," - List of community bags."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of community labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_cohort_community_labels",children:"get_cohort_community_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_cohort_community_labels(\n files: List[str], labels: List[np.ndarray],\n communities_all: List[List[List[int]]]) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Transform kmeans parameterized latent vector into communities. Get cohort community labels for given labels, and community bags."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str], deprecated"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"communities_all"})," ",(0,i.jsx)(n.em,{children:"List[List[List[int]]]"})," - List of community bags."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of cohort community labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"umap_embedding",children:"umap_embedding"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def umap_embedding(cfg: dict, file: str, model_name: str, n_cluster: int,\n parametrization: str) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform UMAP embedding for given file and parameters."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file"})," ",(0,i.jsx)(n.em,{children:"str"})," - File path."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - UMAP embedding."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"umap_vis",children:"umap_vis"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def umap_vis(cfg: dict, file: str, embed: np.ndarray,\n community_labels_all: np.ndarray) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create plotly visualizaton of UMAP embedding."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file"})," ",(0,i.jsx)(n.em,{children:"str"})," - File path."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"embed"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"community_labels_all"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Community labels."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h4,{id:"community",children:"community"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def community(config: str,\n cohort: bool = True,\n show_umap: bool = False,\n cut_tree: int = None) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform community analysis."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cohort"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Flag indicating cohort analysis. Defaults to True."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"show_umap"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Flag indicating weather to show UMAP visualization. Defaults to False."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Cut line for tree. Defaults to None."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var i=s(6540);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1470],{617:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var i=s(4848),r=s(8453);const l={sidebar_label:"community_analysis",title:"vame.analysis.community_analysis"},t=void 0,c={id:"reference/vame/analysis/community_analysis",title:"vame.analysis.community_analysis",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/community_analysis.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/community_analysis",permalink:"/VAME/docs/reference/vame/analysis/community_analysis",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"community_analysis",title:"vame.analysis.community_analysis"},sidebar:"docsSidebar",previous:{title:"API reference",permalink:"/VAME/docs/category/api-reference"},next:{title:"generative_functions",permalink:"/VAME/docs/reference/vame/analysis/generative_functions"}},a={},d=[{value:"get_adjacency_matrix",id:"get_adjacency_matrix",level:4},{value:"get_transition_matrix",id:"get_transition_matrix",level:4},{value:"consecutive",id:"consecutive",level:4},{value:"find_zero_labels",id:"find_zero_labels",level:4},{value:"augment_motif_timeseries",id:"augment_motif_timeseries",level:4},{value:"get_labels",id:"get_labels",level:4},{value:"get_community_label",id:"get_community_label",level:4},{value:"compute_transition_matrices",id:"compute_transition_matrices",level:4},{value:"create_community_bag",id:"create_community_bag",level:4},{value:"create_cohort_community_bag",id:"create_cohort_community_bag",level:4},{value:"get_community_labels",id:"get_community_labels",level:4},{value:"get_cohort_community_labels",id:"get_cohort_community_labels",level:4},{value:"umap_embedding",id:"umap_embedding",level:4},{value:"umap_vis",id:"umap_vis",level:4},{value:"community",id:"community",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xc2\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.p,{children:"Updated 5/11/2022 with PH edits"}),"\n",(0,i.jsx)(n.h4,{id:"get_adjacency_matrix",children:"get_adjacency_matrix"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_adjacency_matrix(\n labels: np.ndarray,\n n_cluster: int) -> Tuple[np.ndarray, np.ndarray, np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Calculate the adjacency matrix, transition matrix, and temporal matrix."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Array of cluster labels."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray, np.ndarray]: Tuple containing adjacency matrix, transition matrix, and temporal matrix."}),"\n",(0,i.jsx)(n.h4,{id:"get_transition_matrix",children:"get_transition_matrix"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_transition_matrix(adjacency_matrix: np.ndarray,\n threshold: float = 0.0) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute the transition matrix from the adjacency matrix."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"adjacency_matrix"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Adjacency matrix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"threshold"})," ",(0,i.jsx)(n.em,{children:"float, optional"})," - Threshold for considering transitions. Defaults to 0.0."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Transition matrix."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"consecutive",children:"consecutive"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies location of missing motif finding consecutive elements in an array and returns array(s) at the split."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"data"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"stepsize"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Step size. Defaults to 1."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of arrays containing consecutive elements."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"find_zero_labels",children:"find_zero_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def find_zero_labels(motif_usage: Tuple[np.ndarray, np.ndarray],\n n_cluster: int) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find zero labels in motif usage and fill them."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"motif_usage"})," ",(0,i.jsx)(n.em,{children:"Tuple[np.ndarray, np.ndarray]"})," - 2D list where the first index is a unique list of motif used and the second index is the motif usage in frames."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - List of motif usage frames with 0's where motifs weren't used (array with zero labels filled)."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"augment_motif_timeseries",children:"augment_motif_timeseries"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def augment_motif_timeseries(label: np.ndarray,\n n_cluster: int) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Augment motif time series by filling zero motifs."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"label"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Original label array."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: Augmented label array and indices of zero motifs."}),"\n",(0,i.jsx)(n.h4,{id:"get_labels",children:"get_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_labels(cfg: dict, files: List[str], model_name: str, n_cluster: int,\n parametrization: str) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get cluster labels for given videos files."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of video files paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of cluster labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_community_label",children:"get_community_label"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_community_label(cfg: dict, files: List[str], model_name: str,\n n_cluster: int, parametrization: str) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Get community labels for given files."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array of community labels."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"compute_transition_matrices",children:"compute_transition_matrices"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def compute_transition_matrices(files: List[str], labels: List[np.ndarray],\n n_cluster: int) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute transition matrices for given files and labels."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of transition matrices."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"create_community_bag",children:"create_community_bag"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def create_community_bag(files: List[str], labels: List[np.ndarray],\n transition_matrices: List[np.ndarray], cut_tree: int,\n n_cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create community bag for given files and labels (Markov chain to tree -> community detection)."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"transition_matrices"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of transition matrices."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int"})," - Cut line for tree."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple containing list of community bags and list of trees."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"create_cohort_community_bag",children:"create_cohort_community_bag"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def create_cohort_community_bag(files: List[str], labels: List[np.ndarray],\n trans_mat_full: np.ndarray, cut_tree: int,\n n_cluster: int) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create cohort community bag for given labels, transition matrix, cut tree, and number of clusters.\n(markov chain to tree -> community detection)"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files paths (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"trans_mat_full"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Full transition matrix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int"})," - Cut line for tree."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple containing list of community bags and list of trees."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_community_labels",children:"get_community_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_community_labels(\n files: List[str], labels: List[np.ndarray],\n communities_all: List[List[List[int]]]) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Transform kmeans parameterized latent vector into communities. Get community labels for given files and community bags."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"communities_all"})," ",(0,i.jsx)(n.em,{children:"List[List[List[int]]]"})," - List of community bags."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of community labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_cohort_community_labels",children:"get_cohort_community_labels"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_cohort_community_labels(\n files: List[str], labels: List[np.ndarray],\n communities_all: List[List[List[int]]]) -> List[np.ndarray]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Transform kmeans parameterized latent vector into communities. Get cohort community labels for given labels, and community bags."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str], deprecated"})," - List of file paths."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"labels"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of label arrays."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"communities_all"})," ",(0,i.jsx)(n.em,{children:"List[List[List[int]]]"})," - List of community bags."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"List[np.ndarray]"})," - List of cohort community labels for each file."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"umap_embedding",children:"umap_embedding"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def umap_embedding(cfg: dict, file: str, model_name: str, n_cluster: int,\n parametrization: str) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform UMAP embedding for given file and parameters."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file"})," ",(0,i.jsx)(n.em,{children:"str"})," - File path."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - Model name."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"n_cluster"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of clusters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"parametrization"})," ",(0,i.jsx)(n.em,{children:"str"})," - parametrization."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - UMAP embedding."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"umap_vis",children:"umap_vis"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def umap_vis(cfg: dict, file: str, embed: np.ndarray,\n community_labels_all: np.ndarray, save_path: str | None) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create plotly visualizaton of UMAP embedding."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file"})," ",(0,i.jsx)(n.em,{children:"str"})," - File path."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"embed"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - UMAP embedding."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"community_labels_all"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Community labels."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"save_path"})," - Path to save the plot. If None it will not save the plot."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h4,{id:"community",children:"community"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@save_state(model=CommunityFunctionSchema)\ndef community(config: str,\n cohort: bool = True,\n show_umap: bool = False,\n cut_tree: int | None = None,\n save_umap_figure: bool = True,\n save_logs: bool = False) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Perform community analysis."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the configuration file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cohort"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Flag indicating cohort analysis. Defaults to True."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"show_umap"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Flag indicating weather to show UMAP visualization. Defaults to False."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cut_tree"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Cut line for tree. Defaults to None."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var i=s(6540);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/af3fc117.002a8e0e.js b/assets/js/af3fc117.002a8e0e.js deleted file mode 100644 index 759aadda..00000000 --- a/assets/js/af3fc117.002a8e0e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2185],{779:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var i=r(4848),t=r(8453);const a={sidebar_label:"create_training",title:"vame.model.create_training"},l=void 0,s={id:"reference/vame/model/create_training",title:"vame.model.create_training",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/model/create_training.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/create_training",permalink:"/VAME/docs/reference/vame/model/create_training",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"create_training",title:"vame.model.create_training"},sidebar:"docsSidebar",previous:{title:"new",permalink:"/VAME/docs/reference/vame/initialize_project/new"},next:{title:"dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader"}},d={},c=[{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"plot_check_parameter",id:"plot_check_parameter",level:4},{value:"traindata_aligned",id:"traindata_aligned",level:4},{value:"traindata_fixed",id:"traindata_fixed",level:4},{value:"create_trainset",id:"create_trainset",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies indices of NaN values in an array and provides a function to convert them to non-NaN indices."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, Union[np.ndarray, None]]: A tuple containing two elements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An array of boolean values indicating the positions of NaN values."}),"\n",(0,i.jsx)(n.li,{children:"A lambda function to convert NaN indices to non-NaN indices."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates all NaN values in the given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array with NaN values replaced by interpolated values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"plot_check_parameter",children:"plot_check_parameter"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def plot_check_parameter(cfg: dict, iqr_val: float, num_frames: int,\n X_true: List[np.ndarray], X_med: np.ndarray,\n anchor_1: int, anchor_2: int) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Plot the check parameter - z-scored data and the filtered data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"iqr_val"})," ",(0,i.jsx)(n.em,{children:"float"})," - IQR value."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_frames"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of frames."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"X_true"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of true data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"X_med"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Filtered data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"anchor_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the first anchor point (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"anchor_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the second anchor point (deprecated)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Plot the z-scored data and the filtered data."}),"\n",(0,i.jsx)(n.h4,{id:"traindata_aligned",children:"traindata_aligned"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def traindata_aligned(cfg: dict, files: List[str], testfraction: float,\n num_features: int, savgol_filter: bool,\n check_parameter: bool) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create training dataset for aligned data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"testfraction"})," ",(0,i.jsx)(n.em,{children:"float"})," - Fraction of data to use as test data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_features"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of features (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"savgol_filter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether to apply Savitzky-Golay filter."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - If True, the function will plot the z-scored data and the filtered data."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Save numpy arrays with the test/train info to the project folder."}),"\n",(0,i.jsx)(n.h4,{id:"traindata_fixed",children:"traindata_fixed"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def traindata_fixed(cfg: dict, files: List[str], testfraction: float,\n num_features: int, savgol_filter: bool,\n check_parameter: bool,\n pose_ref_index: Optional[List[int]]) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create training dataset for fixed data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"testfraction"})," ",(0,i.jsx)(n.em,{children:"float"})," - Fraction of data to use as test data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_features"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"savgol_filter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether to apply Savitzky-Golay filter."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - If True, the function will plot the z-scored data and the filtered data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"Optional[List[int]]"})," - List of reference coordinate indices for alignment."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Save numpy arrays with the test/train info to the project folder."}),"\n",(0,i.jsx)(n.h4,{id:"create_trainset",children:"create_trainset"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def create_trainset(config: str,\n pose_ref_index: Optional[List] = None,\n check_parameter: bool = False) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Creates a training dataset for the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"Optional[List], optional"})," - List of reference coordinate indices for alignment. Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - If True, the function will plot the z-scored data and the filtered data. Defaults to False."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>s});var i=r(6540);const t={},a=i.createContext(t);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/af3fc117.8b7f57ef.js b/assets/js/af3fc117.8b7f57ef.js new file mode 100644 index 00000000..56b84fa3 --- /dev/null +++ b/assets/js/af3fc117.8b7f57ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2185],{779:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var i=r(4848),t=r(8453);const a={sidebar_label:"create_training",title:"vame.model.create_training"},l=void 0,s={id:"reference/vame/model/create_training",title:"vame.model.create_training",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/model/create_training.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/create_training",permalink:"/VAME/docs/reference/vame/model/create_training",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"create_training",title:"vame.model.create_training"},sidebar:"docsSidebar",previous:{title:"logger",permalink:"/VAME/docs/reference/vame/logging/logger"},next:{title:"dataloader",permalink:"/VAME/docs/reference/vame/model/dataloader"}},d={},c=[{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"plot_check_parameter",id:"plot_check_parameter",level:4},{value:"traindata_aligned",id:"traindata_aligned",level:4},{value:"traindata_fixed",id:"traindata_fixed",level:4},{value:"create_trainset",id:"create_trainset",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies indices of NaN values in an array and provides a function to convert them to non-NaN indices."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, Union[np.ndarray, None]]: A tuple containing two elements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An array of boolean values indicating the positions of NaN values."}),"\n",(0,i.jsx)(n.li,{children:"A lambda function to convert NaN indices to non-NaN indices."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates all NaN values in the given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array with NaN values replaced by interpolated values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"plot_check_parameter",children:"plot_check_parameter"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def plot_check_parameter(cfg: dict,\n iqr_val: float,\n num_frames: int,\n X_true: List[np.ndarray],\n X_med: np.ndarray,\n anchor_1: int | None = None,\n anchor_2: int | None = None) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Plot the check parameter - z-scored data and the filtered data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"iqr_val"})," ",(0,i.jsx)(n.em,{children:"float"})," - IQR value."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_frames"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of frames."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"X_true"})," ",(0,i.jsx)(n.em,{children:"List[np.ndarray]"})," - List of true data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"X_med"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Filtered data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"anchor_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the first anchor point (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"anchor_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Index of the second anchor point (deprecated)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Plot the z-scored data and the filtered data."}),"\n",(0,i.jsx)(n.h4,{id:"traindata_aligned",children:"traindata_aligned"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def traindata_aligned(cfg: dict, files: List[str], testfraction: float,\n num_features: int, savgol_filter: bool,\n check_parameter: bool) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create training dataset for aligned data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"testfraction"})," ",(0,i.jsx)(n.em,{children:"float"})," - Fraction of data to use as test data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_features"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of features (deprecated)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"savgol_filter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether to apply Savitzky-Golay filter."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - If True, the function will plot the z-scored data and the filtered data."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Save numpy arrays with the test/train info to the project folder."}),"\n",(0,i.jsx)(n.h4,{id:"traindata_fixed",children:"traindata_fixed"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def traindata_fixed(cfg: dict, files: List[str], testfraction: float,\n num_features: int, savgol_filter: bool,\n check_parameter: bool,\n pose_ref_index: Optional[List[int]]) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Create training dataset for fixed data."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration parameters."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"files"})," ",(0,i.jsx)(n.em,{children:"List[str]"})," - List of files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"testfraction"})," ",(0,i.jsx)(n.em,{children:"float"})," - Fraction of data to use as test data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_features"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"savgol_filter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Flag indicating whether to apply Savitzky-Golay filter."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool"})," - If True, the function will plot the z-scored data and the filtered data."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"Optional[List[int]]"})," - List of reference coordinate indices for alignment."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None - Save numpy arrays with the test/train info to the project folder."}),"\n",(0,i.jsx)(n.h4,{id:"create_trainset",children:"create_trainset"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@save_state(model=CreateTrainsetFunctionSchema)\ndef create_trainset(config: str,\n pose_ref_index: Optional[List] = None,\n check_parameter: bool = False,\n save_logs: bool = False) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Creates a training dataset for the VAME model."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"config"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the config file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"Optional[List], optional"})," - List of reference coordinate indices for alignment. Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"check_parameter"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - If True, the function will plot the z-scored data and the filtered data. Defaults to False."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>s});var i=r(6540);const t={},a=i.createContext(t);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c4ea8f9a.bab47106.js b/assets/js/c4ea8f9a.de3a06a9.js similarity index 75% rename from assets/js/c4ea8f9a.bab47106.js rename to assets/js/c4ea8f9a.de3a06a9.js index faa9c220..a7755140 100644 --- a/assets/js/c4ea8f9a.bab47106.js +++ b/assets/js/c4ea8f9a.de3a06a9.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5908],{5337:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var i=r(4848),s=r(8453);const t={sidebar_label:"csv_to_npy",title:"vame.util.csv_to_npy"},a=void 0,l={id:"reference/vame/util/csv_to_npy",title:"vame.util.csv_to_npy",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/csv_to_npy.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"csv_to_npy",title:"vame.util.csv_to_npy"},sidebar:"docsSidebar",previous:{title:"auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary"},next:{title:"gif_pose_helper",permalink:"/VAME/docs/reference/vame/util/gif_pose_helper"}},o={},c=[{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"csv_to_numpy",id:"csv_to_numpy",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies indices of NaN values in an array and provides a function to convert them to non-NaN indices."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, Union[np.ndarray, None]]: A tuple containing two elements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An array of boolean values indicating the positions of NaN values."}),"\n",(0,i.jsx)(n.li,{children:"A lambda function to convert NaN indices to non-NaN indices."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates all NaN values of a given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - A numpy array with NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - A numpy array with interpolated NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"csv_to_numpy",children:"csv_to_numpy"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def csv_to_numpy(config: str) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Converts a pose-estimation.csv file to a numpy array. Note that this code is only useful for data which is a priori egocentric, i.e. head-fixed\nor otherwise restrained animals."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ValueError"})," - If the config.yaml file indicates that the data is not egocentric."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>l});var i=r(6540);const s={},t=i.createContext(s);function a(e){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5908],{5337:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var i=r(4848),s=r(8453);const t={sidebar_label:"csv_to_npy",title:"vame.util.csv_to_npy"},a=void 0,l={id:"reference/vame/util/csv_to_npy",title:"vame.util.csv_to_npy",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/csv_to_npy.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"csv_to_npy",title:"vame.util.csv_to_npy"},sidebar:"docsSidebar",previous:{title:"auxiliary",permalink:"/VAME/docs/reference/vame/util/auxiliary"},next:{title:"gif_pose_helper",permalink:"/VAME/docs/reference/vame/util/gif_pose_helper"}},o={},c=[{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"csv_to_numpy",id:"csv_to_numpy",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Identifies indices of NaN values in an array and provides a function to convert them to non-NaN indices."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array containing NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[np.ndarray, Union[np.ndarray, None]]: A tuple containing two elements:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"An array of boolean values indicating the positions of NaN values."}),"\n",(0,i.jsx)(n.li,{children:"A lambda function to convert NaN indices to non-NaN indices."}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates all NaN values of a given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - A numpy array with NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - A numpy array with interpolated NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"csv_to_numpy",children:"csv_to_numpy"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@save_state(model=CsvToNumpyFunctionSchema)\ndef csv_to_numpy(config: str, save_logs=False) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Converts a pose-estimation.csv file to a numpy array. Note that this code is only useful for data which is a priori egocentric, i.e. head-fixed\nor otherwise restrained animals."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ValueError"})," - If the config.yaml file indicates that the data is not egocentric."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>l});var i=r(6540);const s={},t=i.createContext(s);function a(e){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6fdf9fc.85db18b6.js b/assets/js/d6fdf9fc.85db18b6.js deleted file mode 100644 index c9ab2017..00000000 --- a/assets/js/d6fdf9fc.85db18b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1665],{5648:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>a,frontMatter:()=>d,metadata:()=>c,toc:()=>t});var i=r(4848),s=r(8453);const d={sidebar_label:"rnn_model",title:"vame.model.rnn_model"},l=void 0,c={id:"reference/vame/model/rnn_model",title:"vame.model.rnn_model",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/rnn_model.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"rnn_model",title:"vame.model.rnn_model"},sidebar:"docsSidebar",previous:{title:"evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate"},next:{title:"rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae"}},o={},t=[{value:"Encoder Objects",id:"encoder-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"forward",id:"forward",level:4},{value:"Lambda Objects",id:"lambda-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"forward",id:"forward-1",level:4},{value:"Decoder Objects",id:"decoder-objects",level:2},{value:"__init__",id:"__init__-2",level:4},{value:"forward",id:"forward-2",level:4},{value:"Decoder_Future Objects",id:"decoder_future-objects",level:2},{value:"__init__",id:"__init__-3",level:4},{value:"forward",id:"forward-3",level:4},{value:"RNN_VAE Objects",id:"rnn_vae-objects",level:2},{value:"__init__",id:"__init__-4",level:4},{value:"forward",id:"forward-4",level:4},{value:"Encoder_LEGACY Objects",id:"encoder_legacy-objects",level:2},{value:"__init__",id:"__init__-5",level:4},{value:"forward",id:"forward-5",level:4},{value:"Lambda_LEGACY Objects",id:"lambda_legacy-objects",level:2},{value:"__init__",id:"__init__-6",level:4},{value:"forward",id:"forward-6",level:4},{value:"Decoder_LEGACY Objects",id:"decoder_legacy-objects",level:2},{value:"__init__",id:"__init__-7",level:4},{value:"forward",id:"forward-7",level:4},{value:"Decoder_Future_LEGACY Objects",id:"decoder_future_legacy-objects",level:2},{value:"__init__",id:"__init__-8",level:4},{value:"forward",id:"forward-8",level:4},{value:"RNN_VAE_LEGACY Objects",id:"rnn_vae_legacy-objects",level:2},{value:"__init__",id:"__init__-9",level:4},{value:"forward",id:"forward-9",level:4}];function h(e){const n={a:"a",code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsxs)(n.p,{children:["The Model is partially adapted from the Timeseries Clustering repository developed by Tejas Lodaya:\n",(0,i.jsx)(n.a,{href:"https://github.com/tejaslodaya/timeseries-clustering-vae/blob/master/vrae/vrae.py",children:"https://github.com/tejaslodaya/timeseries-clustering-vae/blob/master/vrae/vrae.py"})]}),"\n",(0,i.jsx)(n.h2,{id:"encoder-objects",children:"Encoder Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Encoder(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Encoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(NUM_FEATURES: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, dropout_encoder: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Encoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Encoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, sequence_length, num_features)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Encoded representation tensor of shape (batch_size, hidden_size_layer_1 * 4)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lambda-objects",children:"Lambda Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Lambda(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Lambda module for computing the latent space parameters."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-1",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(ZDIMS: int, hidden_size_layer_1: int, hidden_size_layer_2: int,\n softplus: bool)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Lambda module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int, deprecated"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"softplus"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to use softplus activation for logvar."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-1",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(\n hidden: torch.Tensor\n) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Lambda module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Hidden representation tensor of shape (batch_size, hidden_size_layer_1 * 4)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"tuple[torch.Tensor, torch.Tensor, torch.Tensor]: Latent space tensor, mean tensor, logvar tensor."}),"\n",(0,i.jsx)(n.h2,{id:"decoder-objects",children:"Decoder Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-2",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n hidden_size_rec: int, dropout_rec: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Decoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_rec"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-2",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor, z: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Decoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, seq_len, ZDIMS)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"z"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Latent space tensor of shape (batch_size, ZDIMS)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Decoded output tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"decoder_future-objects",children:"Decoder_Future Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder_Future(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decoder module for predicting future sequences."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-3",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_STEPS: int, hidden_size_pred: int, dropout_pred: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Decoder_Future module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_pred"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-3",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor, z: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Decoder_Future module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, seq_len, ZDIMS)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"z"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Latent space tensor of shape (batch_size, ZDIMS)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Predicted future tensor of shape (batch_size, FUTURE_STEPS, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"rnn_vae-objects",children:"RNN_VAE Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class RNN_VAE(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Variational Autoencoder module."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-4",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_DECODER: bool, FUTURE_STEPS: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, hidden_size_rec: int,\n hidden_size_pred: int, dropout_encoder: float, dropout_rec: float,\n dropout_pred: float, softplus: bool)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the VAE module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_DECODER"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to include a future decoder."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for encoder."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-4",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(seq: torch.Tensor) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the VAE."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"seq"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input sequence tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple containing:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"If FUTURE_DECODER is True:"}),"\n",(0,i.jsx)(n.li,{children:"prediction (torch.Tensor): Reconstructed input sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"future (torch.Tensor): Predicted future sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"z (torch.Tensor): Latent representation tensor."}),"\n",(0,i.jsx)(n.li,{children:"mu (torch.Tensor): Mean of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"logvar (torch.Tensor): Log variance of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"If FUTURE_DECODER is False:"}),"\n",(0,i.jsx)(n.li,{children:"prediction (torch.Tensor): Reconstructed input sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"z (torch.Tensor): Latent representation tensor."}),"\n",(0,i.jsx)(n.li,{children:"mu (torch.Tensor): Mean of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"logvar (torch.Tensor): Log variance of the latent distribution tensor."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"encoder_legacy-objects",children:"Encoder_LEGACY Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Encoder_LEGACY(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"LEGACY Encoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-5",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(NUM_FEATURES: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, dropout_encoder: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Initialize the Encoder_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the encoder."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-5",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Forward pass of the Encoder_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Encoded tensor."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lambda_legacy-objects",children:"Lambda_LEGACY Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Lambda_LEGACY(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"LEGACY Lambda module for computing the latent space parameters."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-6",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(ZDIMS: int, hidden_size_layer_1: int, hidden_size_layer_2: int)\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Initialize the Lambda_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-6",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(\n cell_output: torch.Tensor\n) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Forward pass of the Lambda_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cell_output"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Output tensor of the encoder."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: Tuple containing:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Sampled latent tensor."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Mean of the latent distribution."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Log variance of the latent distribution."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"decoder_legacy-objects",children:"Decoder_LEGACY Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder_LEGACY(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"LEGACY Decoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-7",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n hidden_size_rec: int, dropout_rec: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Initialize the Decoder_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_rec"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the decoder."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-7",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Forward pass of the Decoder_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Reconstructed tensor."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"decoder_future_legacy-objects",children:"Decoder_Future_LEGACY Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder_Future_LEGACY(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"LEGACY Decoder module for predicting future sequences."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-8",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_STEPS: int, hidden_size_pred: int, dropout_pred: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Initialize the Decoder_Future_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_pred"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the prediction."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-8",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Forward pass of the Decoder_Future_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Predicted future tensor."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"rnn_vae_legacy-objects",children:"RNN_VAE_LEGACY Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class RNN_VAE_LEGACY(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"LEGACY Variational Autoencoder module."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-9",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_DECODER: bool, FUTURE_STEPS: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, hidden_size_rec: int,\n hidden_size_pred: int, dropout_encoder: float, dropout_rec: float,\n dropout_pred: float, softplus: bool)\n"})}),"\n",(0,i.jsx)(n.p,{children:"(LEGACY) Initialize the RNN_VAE_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_DECODER"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to include a future decoder."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the encoder."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"}),"0 ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the decoder."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"}),"1 ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for the prediction."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"}),"2 ",(0,i.jsx)(n.em,{children:"bool, deprecated"})," - Whether to use softplus activation."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-9",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(seq: torch.Tensor) -> Tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the RNN_VAE_LEGACY module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"seq"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input sequence tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"Tuple"})," - Tuple containing:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Predicted tensor."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Future prediction tensor if FUTURE_DECODER is True, else nothing."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Latent tensor."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Mean of the latent distribution."}),"\n",(0,i.jsx)(n.li,{children:"torch.Tensor: Log variance of the latent distribution."}),"\n"]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>c});var i=r(6540);const s={},d=i.createContext(s);function l(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d6fdf9fc.cb260834.js b/assets/js/d6fdf9fc.cb260834.js new file mode 100644 index 00000000..c8e205fc --- /dev/null +++ b/assets/js/d6fdf9fc.cb260834.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1665],{5648:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>d,metadata:()=>o,toc:()=>t});var i=r(4848),s=r(8453);const d={sidebar_label:"rnn_model",title:"vame.model.rnn_model"},l=void 0,o={id:"reference/vame/model/rnn_model",title:"vame.model.rnn_model",description:"Variational Animal Motion Embedding 0.1 Toolbox",source:"@site/docs/reference/vame/model/rnn_model.md",sourceDirName:"reference/vame/model",slug:"/reference/vame/model/rnn_model",permalink:"/VAME/docs/reference/vame/model/rnn_model",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"rnn_model",title:"vame.model.rnn_model"},sidebar:"docsSidebar",previous:{title:"evaluate",permalink:"/VAME/docs/reference/vame/model/evaluate"},next:{title:"rnn_vae",permalink:"/VAME/docs/reference/vame/model/rnn_vae"}},c={},t=[{value:"Encoder Objects",id:"encoder-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"forward",id:"forward",level:4},{value:"Lambda Objects",id:"lambda-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"forward",id:"forward-1",level:4},{value:"Decoder Objects",id:"decoder-objects",level:2},{value:"__init__",id:"__init__-2",level:4},{value:"forward",id:"forward-2",level:4},{value:"Decoder_Future Objects",id:"decoder_future-objects",level:2},{value:"__init__",id:"__init__-3",level:4},{value:"forward",id:"forward-3",level:4},{value:"RNN_VAE Objects",id:"rnn_vae-objects",level:2},{value:"__init__",id:"__init__-4",level:4},{value:"forward",id:"forward-4",level:4}];function h(e){const n={a:"a",code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 0.1 Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsxs)(n.p,{children:["The Model is partially adapted from the Timeseries Clustering repository developed by Tejas Lodaya:\n",(0,i.jsx)(n.a,{href:"https://github.com/tejaslodaya/timeseries-clustering-vae/blob/master/vrae/vrae.py",children:"https://github.com/tejaslodaya/timeseries-clustering-vae/blob/master/vrae/vrae.py"})]}),"\n",(0,i.jsx)(n.h2,{id:"encoder-objects",children:"Encoder Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Encoder(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Encoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(NUM_FEATURES: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, dropout_encoder: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Encoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Encoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, sequence_length, num_features)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Encoded representation tensor of shape (batch_size, hidden_size_layer_1 * 4)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lambda-objects",children:"Lambda Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Lambda(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Lambda module for computing the latent space parameters."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-1",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(ZDIMS: int, hidden_size_layer_1: int, hidden_size_layer_2: int,\n softplus: bool)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Lambda module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int, deprecated"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"softplus"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to use softplus activation for logvar."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-1",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(\n hidden: torch.Tensor\n) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Lambda module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Hidden representation tensor of shape (batch_size, hidden_size_layer_1 * 4)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"tuple[torch.Tensor, torch.Tensor, torch.Tensor]: Latent space tensor, mean tensor, logvar tensor."}),"\n",(0,i.jsx)(n.h2,{id:"decoder-objects",children:"Decoder Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decoder module of the Variational Autoencoder."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-2",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n hidden_size_rec: int, dropout_rec: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Decoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_rec"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-2",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor, z: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Decoder module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, seq_len, ZDIMS)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"z"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Latent space tensor of shape (batch_size, ZDIMS)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Decoded output tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"decoder_future-objects",children:"Decoder_Future Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Decoder_Future(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decoder module for predicting future sequences."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-3",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_STEPS: int, hidden_size_pred: int, dropout_pred: float)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the Decoder_Future module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_pred"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for regularization."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-3",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(inputs: torch.Tensor, z: torch.Tensor) -> torch.Tensor\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the Decoder_Future module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"inputs"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input tensor of shape (batch_size, seq_len, ZDIMS)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"z"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Latent space tensor of shape (batch_size, ZDIMS)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"torch.Tensor"})," - Predicted future tensor of shape (batch_size, FUTURE_STEPS, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"rnn_vae-objects",children:"RNN_VAE Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class RNN_VAE(nn.Module)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Variational Autoencoder module."}),"\n",(0,i.jsx)(n.h4,{id:"__init__-4",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(TEMPORAL_WINDOW: int, ZDIMS: int, NUM_FEATURES: int,\n FUTURE_DECODER: bool, FUTURE_STEPS: int, hidden_size_layer_1: int,\n hidden_size_layer_2: int, hidden_size_rec: int,\n hidden_size_pred: int, dropout_encoder: float, dropout_rec: float,\n dropout_pred: float, softplus: bool)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initialize the VAE module."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"TEMPORAL_WINDOW"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the temporal window."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ZDIMS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the latent space."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"NUM_FEATURES"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of input features."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_DECODER"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to include a future decoder."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"FUTURE_STEPS"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of future steps to predict."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_1"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the first hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_layer_2"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the second hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_rec"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the recurrent hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"hidden_size_pred"})," ",(0,i.jsx)(n.em,{children:"int"})," - Size of the prediction hidden layer."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dropout_encoder"})," ",(0,i.jsx)(n.em,{children:"float"})," - Dropout rate for encoder."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"forward-4",children:"forward"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def forward(seq: torch.Tensor) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Forward pass of the VAE."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"seq"})," ",(0,i.jsx)(n.em,{children:"torch.Tensor"})," - Input sequence tensor of shape (batch_size, seq_len, NUM_FEATURES)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"Tuple containing:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"If FUTURE_DECODER is True:"}),"\n",(0,i.jsx)(n.li,{children:"prediction (torch.Tensor): Reconstructed input sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"future (torch.Tensor): Predicted future sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"z (torch.Tensor): Latent representation tensor."}),"\n",(0,i.jsx)(n.li,{children:"mu (torch.Tensor): Mean of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"logvar (torch.Tensor): Log variance of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"If FUTURE_DECODER is False:"}),"\n",(0,i.jsx)(n.li,{children:"prediction (torch.Tensor): Reconstructed input sequence tensor."}),"\n",(0,i.jsx)(n.li,{children:"z (torch.Tensor): Latent representation tensor."}),"\n",(0,i.jsx)(n.li,{children:"mu (torch.Tensor): Mean of the latent distribution tensor."}),"\n",(0,i.jsx)(n.li,{children:"logvar (torch.Tensor): Log variance of the latent distribution tensor."}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>o});var i=r(6540);const s={},d=i.createContext(s);function l(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ecdbbd59.3277e838.js b/assets/js/ecdbbd59.3277e838.js deleted file mode 100644 index 4c05de62..00000000 --- a/assets/js/ecdbbd59.3277e838.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4693],{4333:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var s=r(4848),t=r(8453);const i={sidebar_label:"tree_hierarchy",title:"vame.analysis.tree_hierarchy"},l=void 0,c={id:"reference/vame/analysis/tree_hierarchy",title:"vame.analysis.tree_hierarchy",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/tree_hierarchy.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/tree_hierarchy",permalink:"/VAME/docs/reference/vame/analysis/tree_hierarchy",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"tree_hierarchy",title:"vame.analysis.tree_hierarchy"},sidebar:"docsSidebar",previous:{title:"segment_behavior",permalink:"/VAME/docs/reference/vame/analysis/segment_behavior"},next:{title:"umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization"}},o={},a=[{value:"hierarchy_pos",id:"hierarchy_pos",level:4},{value:"merge_func",id:"merge_func",level:4},{value:"graph_to_tree",id:"graph_to_tree",level:4},{value:"draw_tree",id:"draw_tree",level:4},{value:"traverse_tree",id:"traverse_tree",level:4},{value:"traverse_tree",id:"traverse_tree-1",level:4},{value:"traverse_tree_cutline",id:"traverse_tree_cutline",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"hierarchy_pos",children:"hierarchy_pos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def hierarchy_pos(G: nx.Graph,\n root: str = None,\n width: float = 0.5,\n vert_gap: float = 0.2,\n vert_loc: float = 0,\n xcenter: float = 0.5) -> Dict[str, Tuple[float, float]]\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Positions nodes in a tree-like layout.\nRef: From Joel's answer at ",(0,s.jsx)(n.a,{href:"https://stackoverflow.com/a/29597209/2966723",children:"https://stackoverflow.com/a/29597209/2966723"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"G"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The input graph. Must be a tree."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, the function selects a root node based on graph type."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"width"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The horizontal space assigned to each level."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"vert_gap"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The vertical gap between levels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"vert_loc"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The vertical location of the root node."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"xcenter"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The horizontal location of the root node."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"Dict[str, Tuple[float, float]]: A dictionary mapping node names to their positions (x, y)."}),"\n",(0,s.jsx)(n.h4,{id:"merge_func",children:"merge_func"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def merge_func(transition_matrix: np.ndarray, n_cluster: int,\n motif_norm: np.ndarray,\n merge_sel: int) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Merge nodes in a graph based on a selection criterion."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transition_matrix"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The transition matrix of the graph."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - The number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"motif_norm"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The normalized motif matrix."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"merge_sel"})," ",(0,s.jsx)(n.em,{children:"int"})," - The merge selection criterion.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"0: Merge nodes with highest transition probability."}),"\n",(0,s.jsx)(n.li,{children:"1: Merge nodes with lowest cost."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ValueError"})," - If an invalid merge selection criterion is provided."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: A tuple containing the merged nodes."}),"\n",(0,s.jsx)(n.h4,{id:"graph_to_tree",children:"graph_to_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def graph_to_tree(motif_usage: np.ndarray,\n transition_matrix: np.ndarray,\n n_cluster: int,\n merge_sel: int = 1) -> nx.Graph\n"})}),"\n",(0,s.jsx)(n.p,{children:"Convert a graph to a tree."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"motif_usage"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The motif usage matrix."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transition_matrix"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The transition matrix of the graph."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - The number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"merge_sel"})," ",(0,s.jsx)(n.em,{children:"int, optional"})," - The merge selection criterion. Defaults to 1.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"0: Merge nodes with highest transition probability."}),"\n",(0,s.jsx)(n.li,{children:"1: Merge nodes with lowest cost."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"nx.Graph"})," - The tree."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"draw_tree",children:"draw_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def draw_tree(T: nx.Graph) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Draw a tree."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be drawn."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree",children:"traverse_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree(T: nx.Graph, root_node: str = None) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree and return the traversal sequence."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The traversal sequence."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree-1",children:"traverse_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree(T: nx.Graph, root_node: str = None) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree and return the traversal sequence."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The traversal sequence."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree_cutline",children:"traverse_tree_cutline"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree_cutline(T: nx.Graph,\n root_node: str = None,\n cutline: int = 2) -> List[List[str]]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree with a cutline and return the community bags."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cutline"})," ",(0,s.jsx)(n.em,{children:"int, optional"})," - The cutline level."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"List[List[str]]"})," - List of community bags."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>c});var s=r(6540);const t={},i=s.createContext(t);function l(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ecdbbd59.7a0718b5.js b/assets/js/ecdbbd59.7a0718b5.js new file mode 100644 index 00000000..0134ba10 --- /dev/null +++ b/assets/js/ecdbbd59.7a0718b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4693],{4333:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>a});var s=r(4848),t=r(8453);const i={sidebar_label:"tree_hierarchy",title:"vame.analysis.tree_hierarchy"},l=void 0,o={id:"reference/vame/analysis/tree_hierarchy",title:"vame.analysis.tree_hierarchy",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/analysis/tree_hierarchy.md",sourceDirName:"reference/vame/analysis",slug:"/reference/vame/analysis/tree_hierarchy",permalink:"/VAME/docs/reference/vame/analysis/tree_hierarchy",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"tree_hierarchy",title:"vame.analysis.tree_hierarchy"},sidebar:"docsSidebar",previous:{title:"segment_behavior",permalink:"/VAME/docs/reference/vame/analysis/segment_behavior"},next:{title:"umap_visualization",permalink:"/VAME/docs/reference/vame/analysis/umap_visualization"}},c={},a=[{value:"hierarchy_pos",id:"hierarchy_pos",level:4},{value:"merge_func",id:"merge_func",level:4},{value:"graph_to_tree",id:"graph_to_tree",level:4},{value:"draw_tree",id:"draw_tree",level:4},{value:"traverse_tree",id:"traverse_tree",level:4},{value:"traverse_tree",id:"traverse_tree-1",level:4},{value:"traverse_tree_cutline",id:"traverse_tree_cutline",level:4}];function d(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,s.jsx)(n.h4,{id:"hierarchy_pos",children:"hierarchy_pos"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def hierarchy_pos(G: nx.Graph,\n root: str | None = None,\n width: float = 0.5,\n vert_gap: float = 0.2,\n vert_loc: float = 0,\n xcenter: float = 0.5) -> Dict[str, Tuple[float, float]]\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Positions nodes in a tree-like layout.\nRef: From Joel's answer at ",(0,s.jsx)(n.a,{href:"https://stackoverflow.com/a/29597209/2966723",children:"https://stackoverflow.com/a/29597209/2966723"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"G"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The input graph. Must be a tree."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, the function selects a root node based on graph type."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"width"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The horizontal space assigned to each level."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"vert_gap"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The vertical gap between levels."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"vert_loc"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The vertical location of the root node."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"xcenter"})," ",(0,s.jsx)(n.em,{children:"float, optional"})," - The horizontal location of the root node."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"Dict[str, Tuple[float, float]]: A dictionary mapping node names to their positions (x, y)."}),"\n",(0,s.jsx)(n.h4,{id:"merge_func",children:"merge_func"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def merge_func(transition_matrix: np.ndarray, n_cluster: int,\n motif_norm: np.ndarray,\n merge_sel: int) -> Tuple[np.ndarray, np.ndarray]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Merge nodes in a graph based on a selection criterion."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transition_matrix"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The transition matrix of the graph."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - The number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"motif_norm"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The normalized motif matrix."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"merge_sel"})," ",(0,s.jsx)(n.em,{children:"int"})," - The merge selection criterion.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"0: Merge nodes with highest transition probability."}),"\n",(0,s.jsx)(n.li,{children:"1: Merge nodes with lowest cost."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ValueError"})," - If an invalid merge selection criterion is provided."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"Tuple[np.ndarray, np.ndarray]: A tuple containing the merged nodes."}),"\n",(0,s.jsx)(n.h4,{id:"graph_to_tree",children:"graph_to_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def graph_to_tree(motif_usage: np.ndarray,\n transition_matrix: np.ndarray,\n n_cluster: int,\n merge_sel: int = 1) -> nx.Graph\n"})}),"\n",(0,s.jsx)(n.p,{children:"Convert a graph to a tree."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"motif_usage"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The motif usage matrix."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"transition_matrix"})," ",(0,s.jsx)(n.em,{children:"np.ndarray"})," - The transition matrix of the graph."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"n_cluster"})," ",(0,s.jsx)(n.em,{children:"int"})," - The number of clusters."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"merge_sel"})," ",(0,s.jsx)(n.em,{children:"int, optional"})," - The merge selection criterion. Defaults to 1.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"0: Merge nodes with highest transition probability."}),"\n",(0,s.jsx)(n.li,{children:"1: Merge nodes with lowest cost."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"nx.Graph"})," - The tree."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"draw_tree",children:"draw_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def draw_tree(T: nx.Graph) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Draw a tree."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be drawn."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsx)(n.p,{children:"None"}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree",children:"traverse_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree and return the traversal sequence."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The traversal sequence."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree-1",children:"traverse_tree"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree and return the traversal sequence."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The traversal sequence."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"traverse_tree_cutline",children:"traverse_tree_cutline"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def traverse_tree_cutline(T: nx.Graph,\n root_node: str | None = None,\n cutline: int = 2) -> List[List[str]]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Traverse a tree with a cutline and return the community bags."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"T"})," ",(0,s.jsx)(n.em,{children:"nx.Graph"})," - The tree to be traversed."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"root_node"})," ",(0,s.jsx)(n.em,{children:"str, optional"})," - The root node of the tree. If None, traversal starts from the root."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cutline"})," ",(0,s.jsx)(n.em,{children:"int, optional"})," - The cutline level."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"List[List[str]]"})," - List of community bags."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>o});var s=r(6540);const t={},i=s.createContext(t);function l(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f04d77e4.9ab3a07c.js b/assets/js/f04d77e4.9ab3a07c.js new file mode 100644 index 00000000..fa007e15 --- /dev/null +++ b/assets/js/f04d77e4.9ab3a07c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9888],{1632:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>a});var i=r(4848),s=r(8453);const l={sidebar_label:"gif_pose_helper",title:"vame.util.gif_pose_helper"},t=void 0,c={id:"reference/vame/util/gif_pose_helper",title:"vame.util.gif_pose_helper",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/gif_pose_helper.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/gif_pose_helper",permalink:"/VAME/docs/reference/vame/util/gif_pose_helper",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"gif_pose_helper",title:"vame.util.gif_pose_helper"},sidebar:"docsSidebar",previous:{title:"csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy"},next:{title:"FAQ",permalink:"/VAME/docs/faq"}},d={},a=[{value:"crop_and_flip",id:"crop_and_flip",level:4},{value:"background",id:"background",level:4},{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"get_animal_frames",id:"get_animal_frames",level:4}];function o(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"crop_and_flip",children:"crop_and_flip"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def crop_and_flip(rect: tuple, src: np.ndarray, points: list,\n ref_index: list) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Crop and flip an image based on a rectangle and reference points."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"rect"})," ",(0,i.jsx)(n.em,{children:"tuple"})," - Tuple containing rectangle information (center, size, angle)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"src"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Source image to crop and flip."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"points"})," ",(0,i.jsx)(n.em,{children:"list"})," - List of points to be aligned."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ref_index"})," ",(0,i.jsx)(n.em,{children:"list"})," - Reference indices for alignment."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tuple"})," - Cropped and flipped image, shifted points."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"background",children:"background"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def background(path_to_file: str,\n filename: str,\n file_format: str = '.mp4',\n num_frames: int = 100) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute background image from fixed camera."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path_to_file"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the directory containing the video files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the video file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file_format"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_frames"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Number of frames to use for background computation. Defaults to 1000."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Background image."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Helper function to find indices of NaN values."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tuple"})," - Indices of NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates NaN values in the given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array with NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array with interpolated NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_animal_frames",children:"get_animal_frames"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_animal_frames(\n cfg: dict,\n filename: str,\n pose_ref_index: list,\n start: int,\n length: int,\n subtract_background: bool,\n file_format: str = '.mp4',\n crop_size: tuple = (300, 300)) -> list\n"})}),"\n",(0,i.jsx)(n.p,{children:"Extracts frames of an animal from a video file and returns them as a list."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary containing project information."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the video file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"list"})," - List of reference coordinate indices for alignment."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"start"})," ",(0,i.jsx)(n.em,{children:"int"})," - Starting frame index."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"length"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of frames to extract."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"subtract_background"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to subtract background or not."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file_format"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"crop_size"})," ",(0,i.jsx)(n.em,{children:"tuple, optional"})," - Size of the cropped area. Defaults to (300, 300)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"list"})," - List of extracted frames."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>c});var i=r(6540);const s={},l=i.createContext(s);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f04d77e4.a97ffa98.js b/assets/js/f04d77e4.a97ffa98.js deleted file mode 100644 index 8f39e8a5..00000000 --- a/assets/js/f04d77e4.a97ffa98.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9888],{1632:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>o});var i=r(4848),s=r(8453);const l={sidebar_label:"gif_pose_helper",title:"vame.util.gif_pose_helper"},t=void 0,c={id:"reference/vame/util/gif_pose_helper",title:"vame.util.gif_pose_helper",description:"Variational Animal Motion Embedding 1.0-alpha Toolbox",source:"@site/docs/reference/vame/util/gif_pose_helper.md",sourceDirName:"reference/vame/util",slug:"/reference/vame/util/gif_pose_helper",permalink:"/VAME/docs/reference/vame/util/gif_pose_helper",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"gif_pose_helper",title:"vame.util.gif_pose_helper"},sidebar:"docsSidebar",previous:{title:"csv_to_npy",permalink:"/VAME/docs/reference/vame/util/csv_to_npy"},next:{title:"FAQ",permalink:"/VAME/docs/faq"}},d={},o=[{value:"crop_and_flip",id:"crop_and_flip",level:4},{value:"background",id:"background",level:4},{value:"get_rotation_matrix",id:"get_rotation_matrix",level:4},{value:"nan_helper",id:"nan_helper",level:4},{value:"interpol",id:"interpol",level:4},{value:"get_animal_frames",id:"get_animal_frames",level:4}];function a(e){const n={a:"a",code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Variational Animal Motion Embedding 1.0-alpha Toolbox\n\xa9 K. Luxem & P. Bauer, Department of Cellular Neuroscience\nLeibniz Institute for Neurobiology, Magdeburg, Germany"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/LINCellularNeuroscience/VAME",children:"https://github.com/LINCellularNeuroscience/VAME"}),"\nLicensed under GNU General Public License v3.0"]}),"\n",(0,i.jsx)(n.h4,{id:"crop_and_flip",children:"crop_and_flip"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def crop_and_flip(rect: tuple, src: np.ndarray, points: list,\n ref_index: list) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Crop and flip an image based on a rectangle and reference points."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"rect"})," ",(0,i.jsx)(n.em,{children:"tuple"})," - Tuple containing rectangle information (center, size, angle)."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"src"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Source image to crop and flip."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"points"})," ",(0,i.jsx)(n.em,{children:"list"})," - List of points to be aligned."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ref_index"})," ",(0,i.jsx)(n.em,{children:"list"})," - Reference indices for alignment."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tuple"})," - Cropped and flipped image, shifted points."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"background",children:"background"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def background(path_to_file: str,\n filename: str,\n file_format: str = '.mp4',\n num_frames: int = 1000) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute background image from fixed camera."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"path_to_file"})," ",(0,i.jsx)(n.em,{children:"str"})," - Path to the directory containing the video files."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the video file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file_format"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_frames"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - Number of frames to use for background computation. Defaults to 1000."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Background image."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_rotation_matrix",children:"get_rotation_matrix"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_rotation_matrix(\n adjacent: float, opposite: float,\n crop_size: tuple = (300, 300)) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Compute the rotation matrix based on the adjacent and opposite sides."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"adjacent"})," ",(0,i.jsx)(n.em,{children:"float"})," - Length of the adjacent side."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"opposite"})," ",(0,i.jsx)(n.em,{children:"float"})," - Length of the opposite side."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"crop_size"})," ",(0,i.jsx)(n.em,{children:"tuple, optional"})," - Size of the cropped area. Defaults to (300, 300)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Rotation matrix."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"nan_helper",children:"nan_helper"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def nan_helper(y: np.ndarray) -> tuple\n"})}),"\n",(0,i.jsx)(n.p,{children:"Helper function to find indices of NaN values."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"y"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tuple"})," - Indices of NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"interpol",children:"interpol"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def interpol(arr: np.ndarray) -> np.ndarray\n"})}),"\n",(0,i.jsx)(n.p,{children:"Interpolates NaN values in the given array."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"arr"})," ",(0,i.jsx)(n.em,{children:"np.ndarray"})," - Input array with NaN values."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"np.ndarray"})," - Array with interpolated NaN values."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_animal_frames",children:"get_animal_frames"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_animal_frames(\n cfg: dict,\n filename: str,\n pose_ref_index: list,\n start: int,\n length: int,\n subtract_background: bool,\n file_format: str = '.mp4',\n crop_size: tuple = (300, 300)) -> list\n"})}),"\n",(0,i.jsx)(n.p,{children:"Extracts frames of an animal from a video file and returns them as a list."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"cfg"})," ",(0,i.jsx)(n.em,{children:"dict"})," - Configuration dictionary containing project information."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - Name of the video file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"pose_ref_index"})," ",(0,i.jsx)(n.em,{children:"list"})," - List of reference coordinate indices for alignment."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"start"})," ",(0,i.jsx)(n.em,{children:"int"})," - Starting frame index."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"length"})," ",(0,i.jsx)(n.em,{children:"int"})," - Number of frames to extract."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"subtract_background"})," ",(0,i.jsx)(n.em,{children:"bool"})," - Whether to subtract background or not."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"file_format"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - Format of the video file. Defaults to '.mp4'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"crop_size"})," ",(0,i.jsx)(n.em,{children:"tuple, optional"})," - Size of the cropped area. Defaults to (300, 300)."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"list"})," - List of extracted frames."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>c});var i=r(6540);const s={},l=i.createContext(s);function t(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2b90fa0.fc15b5b7.js b/assets/js/f2b90fa0.0b76f466.js similarity index 64% rename from assets/js/f2b90fa0.fc15b5b7.js rename to assets/js/f2b90fa0.0b76f466.js index c4888afc..fe88bf44 100644 --- a/assets/js/f2b90fa0.fc15b5b7.js +++ b/assets/js/f2b90fa0.0b76f466.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2865],{7882:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Introduction","href":"/VAME/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/VAME/docs/getting_started/installation","docId":"getting_started/installation","unlisted":false},{"type":"link","label":"Running VAME Workflow","href":"/VAME/docs/getting_started/running","docId":"getting_started/running","unlisted":false}],"href":"/VAME/docs/category/getting-started"},{"type":"category","label":"API reference","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"vame","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"analysis","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"community_analysis","href":"/VAME/docs/reference/vame/analysis/community_analysis","docId":"reference/vame/analysis/community_analysis","unlisted":false},{"type":"link","label":"generative_functions","href":"/VAME/docs/reference/vame/analysis/generative_functions","docId":"reference/vame/analysis/generative_functions","unlisted":false},{"type":"link","label":"gif_creator","href":"/VAME/docs/reference/vame/analysis/gif_creator","docId":"reference/vame/analysis/gif_creator","unlisted":false},{"type":"link","label":"pose_segmentation","href":"/VAME/docs/reference/vame/analysis/pose_segmentation","docId":"reference/vame/analysis/pose_segmentation","unlisted":false},{"type":"link","label":"segment_behavior","href":"/VAME/docs/reference/vame/analysis/segment_behavior","docId":"reference/vame/analysis/segment_behavior","unlisted":false},{"type":"link","label":"tree_hierarchy","href":"/VAME/docs/reference/vame/analysis/tree_hierarchy","docId":"reference/vame/analysis/tree_hierarchy","unlisted":false},{"type":"link","label":"umap_visualization","href":"/VAME/docs/reference/vame/analysis/umap_visualization","docId":"reference/vame/analysis/umap_visualization","unlisted":false},{"type":"link","label":"videowriter","href":"/VAME/docs/reference/vame/analysis/videowriter","docId":"reference/vame/analysis/videowriter","unlisted":false}]},{"type":"category","label":"initialize_project","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"new","href":"/VAME/docs/reference/vame/initialize_project/new","docId":"reference/vame/initialize_project/new","unlisted":false}]},{"type":"category","label":"model","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"create_training","href":"/VAME/docs/reference/vame/model/create_training","docId":"reference/vame/model/create_training","unlisted":false},{"type":"link","label":"dataloader","href":"/VAME/docs/reference/vame/model/dataloader","docId":"reference/vame/model/dataloader","unlisted":false},{"type":"link","label":"evaluate","href":"/VAME/docs/reference/vame/model/evaluate","docId":"reference/vame/model/evaluate","unlisted":false},{"type":"link","label":"rnn_model","href":"/VAME/docs/reference/vame/model/rnn_model","docId":"reference/vame/model/rnn_model","unlisted":false},{"type":"link","label":"rnn_vae","href":"/VAME/docs/reference/vame/model/rnn_vae","docId":"reference/vame/model/rnn_vae","unlisted":false}]},{"type":"category","label":"util","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"align_egocentrical","href":"/VAME/docs/reference/vame/util/align_egocentrical","docId":"reference/vame/util/align_egocentrical","unlisted":false},{"type":"link","label":"auxiliary","href":"/VAME/docs/reference/vame/util/auxiliary","docId":"reference/vame/util/auxiliary","unlisted":false},{"type":"link","label":"csv_to_npy","href":"/VAME/docs/reference/vame/util/csv_to_npy","docId":"reference/vame/util/csv_to_npy","unlisted":false},{"type":"link","label":"gif_pose_helper","href":"/VAME/docs/reference/vame/util/gif_pose_helper","docId":"reference/vame/util/gif_pose_helper","unlisted":false}]}]}],"href":"/VAME/docs/category/api-reference"},{"type":"link","label":"FAQ","href":"/VAME/docs/faq","docId":"faq","unlisted":false}]},"docs":{"faq":{"id":"faq","title":"FAQ","description":"Frequently Asked Questions","sidebar":"docsSidebar"},"getting_started/installation":{"id":"getting_started/installation","title":"Installation","description":"Installation","sidebar":"docsSidebar"},"getting_started/running":{"id":"getting_started/running","title":"Running VAME Workflow","description":"Workflow Overview","sidebar":"docsSidebar"},"intro":{"id":"intro","title":"Introduction","description":"\ud83c\udf1f Welcome to EthoML/VAME (Variational Animal Motion Encoding), an open-source machine learning tool for behavioral segmentation and analyses.","sidebar":"docsSidebar"},"reference/vame/analysis/community_analysis":{"id":"reference/vame/analysis/community_analysis","title":"vame.analysis.community_analysis","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/generative_functions":{"id":"reference/vame/analysis/generative_functions","title":"vame.analysis.generative_functions","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/gif_creator":{"id":"reference/vame/analysis/gif_creator","title":"vame.analysis.gif_creator","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/pose_segmentation":{"id":"reference/vame/analysis/pose_segmentation","title":"vame.analysis.pose_segmentation","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/segment_behavior":{"id":"reference/vame/analysis/segment_behavior","title":"vame.analysis.segment_behavior","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/tree_hierarchy":{"id":"reference/vame/analysis/tree_hierarchy","title":"vame.analysis.tree_hierarchy","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/umap_visualization":{"id":"reference/vame/analysis/umap_visualization","title":"vame.analysis.umap_visualization","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/videowriter":{"id":"reference/vame/analysis/videowriter","title":"vame.analysis.videowriter","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/initialize_project/new":{"id":"reference/vame/initialize_project/new","title":"vame.initialize_project.new","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/model/create_training":{"id":"reference/vame/model/create_training","title":"vame.model.create_training","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/model/dataloader":{"id":"reference/vame/model/dataloader","title":"vame.model.dataloader","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/evaluate":{"id":"reference/vame/model/evaluate","title":"vame.model.evaluate","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/rnn_model":{"id":"reference/vame/model/rnn_model","title":"vame.model.rnn_model","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/rnn_vae":{"id":"reference/vame/model/rnn_vae","title":"vame.model.rnn_vae","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/util/align_egocentrical":{"id":"reference/vame/util/align_egocentrical","title":"vame.util.align_egocentrical","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/util/auxiliary":{"id":"reference/vame/util/auxiliary","title":"vame.util.auxiliary","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/util/csv_to_npy":{"id":"reference/vame/util/csv_to_npy","title":"vame.util.csv_to_npy","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/util/gif_pose_helper":{"id":"reference/vame/util/gif_pose_helper","title":"vame.util.gif_pose_helper","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2865],{7882:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Introduction","href":"/VAME/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Installation","href":"/VAME/docs/getting_started/installation","docId":"getting_started/installation","unlisted":false},{"type":"link","label":"Running VAME Workflow","href":"/VAME/docs/getting_started/running","docId":"getting_started/running","unlisted":false}],"href":"/VAME/docs/category/getting-started"},{"type":"category","label":"API reference","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"vame","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"analysis","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"community_analysis","href":"/VAME/docs/reference/vame/analysis/community_analysis","docId":"reference/vame/analysis/community_analysis","unlisted":false},{"type":"link","label":"generative_functions","href":"/VAME/docs/reference/vame/analysis/generative_functions","docId":"reference/vame/analysis/generative_functions","unlisted":false},{"type":"link","label":"gif_creator","href":"/VAME/docs/reference/vame/analysis/gif_creator","docId":"reference/vame/analysis/gif_creator","unlisted":false},{"type":"link","label":"pose_segmentation","href":"/VAME/docs/reference/vame/analysis/pose_segmentation","docId":"reference/vame/analysis/pose_segmentation","unlisted":false},{"type":"link","label":"segment_behavior","href":"/VAME/docs/reference/vame/analysis/segment_behavior","docId":"reference/vame/analysis/segment_behavior","unlisted":false},{"type":"link","label":"tree_hierarchy","href":"/VAME/docs/reference/vame/analysis/tree_hierarchy","docId":"reference/vame/analysis/tree_hierarchy","unlisted":false},{"type":"link","label":"umap_visualization","href":"/VAME/docs/reference/vame/analysis/umap_visualization","docId":"reference/vame/analysis/umap_visualization","unlisted":false},{"type":"link","label":"videowriter","href":"/VAME/docs/reference/vame/analysis/videowriter","docId":"reference/vame/analysis/videowriter","unlisted":false}]},{"type":"category","label":"initialize_project","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"new","href":"/VAME/docs/reference/vame/initialize_project/new","docId":"reference/vame/initialize_project/new","unlisted":false}]},{"type":"category","label":"logging","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"logger","href":"/VAME/docs/reference/vame/logging/logger","docId":"reference/vame/logging/logger","unlisted":false}]},{"type":"category","label":"model","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"create_training","href":"/VAME/docs/reference/vame/model/create_training","docId":"reference/vame/model/create_training","unlisted":false},{"type":"link","label":"dataloader","href":"/VAME/docs/reference/vame/model/dataloader","docId":"reference/vame/model/dataloader","unlisted":false},{"type":"link","label":"evaluate","href":"/VAME/docs/reference/vame/model/evaluate","docId":"reference/vame/model/evaluate","unlisted":false},{"type":"link","label":"rnn_model","href":"/VAME/docs/reference/vame/model/rnn_model","docId":"reference/vame/model/rnn_model","unlisted":false},{"type":"link","label":"rnn_vae","href":"/VAME/docs/reference/vame/model/rnn_vae","docId":"reference/vame/model/rnn_vae","unlisted":false}]},{"type":"category","label":"schemas","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"states","href":"/VAME/docs/reference/vame/schemas/states","docId":"reference/vame/schemas/states","unlisted":false}]},{"type":"category","label":"util","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"align_egocentrical","href":"/VAME/docs/reference/vame/util/align_egocentrical","docId":"reference/vame/util/align_egocentrical","unlisted":false},{"type":"link","label":"auxiliary","href":"/VAME/docs/reference/vame/util/auxiliary","docId":"reference/vame/util/auxiliary","unlisted":false},{"type":"link","label":"csv_to_npy","href":"/VAME/docs/reference/vame/util/csv_to_npy","docId":"reference/vame/util/csv_to_npy","unlisted":false},{"type":"link","label":"gif_pose_helper","href":"/VAME/docs/reference/vame/util/gif_pose_helper","docId":"reference/vame/util/gif_pose_helper","unlisted":false}]}]}],"href":"/VAME/docs/category/api-reference"},{"type":"link","label":"FAQ","href":"/VAME/docs/faq","docId":"faq","unlisted":false}]},"docs":{"faq":{"id":"faq","title":"FAQ","description":"Frequently Asked Questions","sidebar":"docsSidebar"},"getting_started/installation":{"id":"getting_started/installation","title":"Installation","description":"Installation","sidebar":"docsSidebar"},"getting_started/running":{"id":"getting_started/running","title":"Running VAME Workflow","description":"Workflow Overview","sidebar":"docsSidebar"},"intro":{"id":"intro","title":"Introduction","description":"\ud83c\udf1f Welcome to EthoML/VAME (Variational Animal Motion Encoding), an open-source machine learning tool for behavioral segmentation and analyses.","sidebar":"docsSidebar"},"reference/vame/analysis/community_analysis":{"id":"reference/vame/analysis/community_analysis","title":"vame.analysis.community_analysis","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/generative_functions":{"id":"reference/vame/analysis/generative_functions","title":"vame.analysis.generative_functions","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/gif_creator":{"id":"reference/vame/analysis/gif_creator","title":"vame.analysis.gif_creator","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/pose_segmentation":{"id":"reference/vame/analysis/pose_segmentation","title":"vame.analysis.pose_segmentation","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/segment_behavior":{"id":"reference/vame/analysis/segment_behavior","title":"vame.analysis.segment_behavior","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/tree_hierarchy":{"id":"reference/vame/analysis/tree_hierarchy","title":"vame.analysis.tree_hierarchy","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/umap_visualization":{"id":"reference/vame/analysis/umap_visualization","title":"vame.analysis.umap_visualization","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/analysis/videowriter":{"id":"reference/vame/analysis/videowriter","title":"vame.analysis.videowriter","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/initialize_project/new":{"id":"reference/vame/initialize_project/new","title":"vame.initialize_project.new","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/logging/logger":{"id":"reference/vame/logging/logger","title":"vame.logging.logger","description":"TqdmToLogger Objects","sidebar":"docsSidebar"},"reference/vame/model/create_training":{"id":"reference/vame/model/create_training","title":"vame.model.create_training","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/model/dataloader":{"id":"reference/vame/model/dataloader","title":"vame.model.dataloader","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/evaluate":{"id":"reference/vame/model/evaluate","title":"vame.model.evaluate","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/rnn_model":{"id":"reference/vame/model/rnn_model","title":"vame.model.rnn_model","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/model/rnn_vae":{"id":"reference/vame/model/rnn_vae","title":"vame.model.rnn_vae","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/schemas/states":{"id":"reference/vame/schemas/states","title":"vame.schemas.states","description":"save\\\\_state","sidebar":"docsSidebar"},"reference/vame/util/align_egocentrical":{"id":"reference/vame/util/align_egocentrical","title":"vame.util.align_egocentrical","description":"Variational Animal Motion Embedding 0.1 Toolbox","sidebar":"docsSidebar"},"reference/vame/util/auxiliary":{"id":"reference/vame/util/auxiliary","title":"vame.util.auxiliary","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/util/csv_to_npy":{"id":"reference/vame/util/csv_to_npy","title":"vame.util.csv_to_npy","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"},"reference/vame/util/gif_pose_helper":{"id":"reference/vame/util/gif_pose_helper","title":"vame.util.gif_pose_helper","description":"Variational Animal Motion Embedding 1.0-alpha Toolbox","sidebar":"docsSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/main.70895056.js b/assets/js/main.70895056.js new file mode 100644 index 00000000..f9de31d5 --- /dev/null +++ b/assets/js/main.70895056.js @@ -0,0 +1,2 @@ +/*! For license information please see main.70895056.js.LICENSE.txt */ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"01a85c17":[()=>Promise.all([n.e(1869),n.e(8209)]).then(n.bind(n,9158)),"@theme/BlogTagsListPage",9158],"04a8f406":[()=>n.e(88).then(n.bind(n,445)),"@site/docs/reference/vame/initialize_project/new.md",445],"0a24c0cb":[()=>n.e(9590).then(n.t.bind(n,8524,19)),"@generated/docusaurus-plugin-content-blog/default/p/vame-blog-tags-vame-8a0.json",8524],"0e384e19":[()=>n.e(3976).then(n.bind(n,1512)),"@site/docs/intro.md",1512],"13dc5c7b":[()=>n.e(5403).then(n.bind(n,801)),"@site/docs/reference/vame/analysis/segment_behavior.md",801],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,4136)),"@theme/DocCategoryGeneratedIndexPage",4136],17896441:[()=>Promise.all([n.e(1869),n.e(1538),n.e(8401)]).then(n.bind(n,6011)),"@theme/DocItem",6011],"17f06cf5":[()=>n.e(8247).then(n.bind(n,2129)),"@site/docs/reference/vame/model/evaluate.md",2129],"1a8342bf":[()=>n.e(7704).then(n.t.bind(n,3532,19)),"@generated/docusaurus-plugin-content-blog/default/p/vame-blog-tags-1ee.json",3532],"1f391b9e":[()=>Promise.all([n.e(1869),n.e(1538),n.e(6061)]).then(n.bind(n,7973)),"@theme/MDXPage",7973],"20a1189d":[()=>n.e(3567).then(n.bind(n,3072)),"@site/docs/reference/vame/analysis/gif_creator.md",3072],"268dfc8f":[()=>n.e(2996).then(n.t.bind(n,7827,19)),"@generated/docusaurus-plugin-content-blog/default/p/vame-blog-729.json",7827],"2707696f":[()=>n.e(7382).then(n.bind(n,7275)),"@site/docs/reference/vame/util/auxiliary.md",7275],"36994c47":[()=>n.e(9858).then(n.t.bind(n,5516,19)),"@generated/docusaurus-plugin-content-blog/default/__plugin.json",5516],"393be207":[()=>n.e(4134).then(n.bind(n,6602)),"@site/src/pages/markdown-page.md",6602],"3a52db76":[()=>n.e(7707).then(n.bind(n,3265)),"@site/docs/reference/vame/analysis/pose_segmentation.md",3265],"3ab23e74":[()=>n.e(134).then(n.bind(n,1201)),"@site/docs/reference/vame/analysis/umap_visualization.md",1201],"498287ba":[()=>n.e(3100).then(n.bind(n,7951)),"@site/docs/reference/vame/schemas/states.md",7951],"4ed6af3d":[()=>n.e(8020).then(n.t.bind(n,3118,19)),"@generated/docusaurus-plugin-content-blog/default/p/vame-blog-tags-blog-2b8.json",3118],"5a083f91":[()=>n.e(8816).then(n.bind(n,4829)),"@site/docs/reference/vame/model/dataloader.md",4829],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],62763787:[()=>n.e(4077).then(n.bind(n,689)),"@site/docs/reference/vame/analysis/videowriter.md",689],"6875c492":[()=>Promise.all([n.e(1869),n.e(1538),n.e(3242),n.e(4813)]).then(n.bind(n,3069)),"@theme/BlogTagsPostsPage",3069],"7661071f":[()=>n.e(8737).then(n.bind(n,4137)),"@site/blog/2021-08-26-welcome/index.md?truncated=true",4137],"770df669":[()=>n.e(9266).then(n.bind(n,5722)),"@site/docs/reference/vame/logging/logger.md",5722],"7ceb4274":[()=>n.e(1967).then(n.bind(n,5676)),"@site/docs/getting_started/running.mdx",5676],"814f3328":[()=>n.e(7472).then(n.t.bind(n,5513,19)),"~blog/default/blog-post-list-prop-default.json",5513],"8adc0ad1":[()=>n.e(8061).then(n.bind(n,3101)),"@site/docs/reference/vame/model/rnn_vae.md",3101],"97262fb0":[()=>n.e(4841).then(n.bind(n,2383)),"@site/docs/reference/vame/util/align_egocentrical.md",2383],"99e0554e":[()=>n.e(4641).then(n.bind(n,5733)),"@site/docs/reference/vame/analysis/generative_functions.md",5733],"9e4087bc":[()=>n.e(2711).then(n.bind(n,9331)),"@theme/BlogArchivePage",9331],a54c3d34:[()=>n.e(1470).then(n.bind(n,617)),"@site/docs/reference/vame/analysis/community_analysis.md",617],a6aa9e1f:[()=>Promise.all([n.e(1869),n.e(1538),n.e(3242),n.e(7643)]).then(n.bind(n,5124)),"@theme/BlogListPage",5124],a7456010:[()=>n.e(1235).then(n.t.bind(n,8552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",8552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,7093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],acecf23e:[()=>n.e(1903).then(n.t.bind(n,1912,19)),"~blog/default/blogMetadata-default.json",1912],af23717f:[()=>n.e(6592).then(n.t.bind(n,5033,19)),"@generated/docusaurus-plugin-content-docs/default/p/vame-docs-category-api-reference-4a3.json",5033],af3fc117:[()=>n.e(2185).then(n.bind(n,779)),"@site/docs/reference/vame/model/create_training.md",779],c4ea8f9a:[()=>n.e(5908).then(n.bind(n,5337)),"@site/docs/reference/vame/util/csv_to_npy.md",5337],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,6467)),"@site/src/pages/index.js",6467],ccc49370:[()=>Promise.all([n.e(1869),n.e(1538),n.e(3242),n.e(3249)]).then(n.bind(n,3858)),"@theme/BlogPostPage",3858],cebd9e3f:[()=>n.e(9632).then(n.t.bind(n,4787,19)),"@generated/docusaurus-plugin-content-docs/default/p/vame-docs-category-getting-started-4c3.json",4787],d6fdf9fc:[()=>n.e(1665).then(n.bind(n,5648)),"@site/docs/reference/vame/model/rnn_model.md",5648],d9f32620:[()=>n.e(5557).then(n.bind(n,7447)),"@site/blog/2021-08-26-welcome/index.md",7447],e56dec7c:[()=>n.e(1385).then(n.t.bind(n,118,19)),"@generated/docusaurus-plugin-content-blog/default/p/vame-blog-archive-569.json",118],ea313555:[()=>n.e(1011).then(n.bind(n,2362)),"@site/docs/faq.mdx",2362],ecdbbd59:[()=>n.e(4693).then(n.bind(n,4333)),"@site/docs/reference/vame/analysis/tree_hierarchy.md",4333],f04d77e4:[()=>n.e(9888).then(n.bind(n,1632)),"@site/docs/reference/vame/util/gif_pose_helper.md",1632],f2711dff:[()=>n.e(1824).then(n.bind(n,7623)),"@site/docs/getting_started/installation.md",7623],f2b90fa0:[()=>n.e(2865).then(n.t.bind(n,7882,19)),"@generated/docusaurus-plugin-content-docs/default/p/vame-docs-d07.json",7882]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(6921),u=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:()=>n.e(2237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,l.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},f=[],p=[],m=(0,c.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),a().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;delete a.__context;const s=a.__props;return delete a.__props,(0,l.jsx)(u.W,{value:i,children:(0,l.jsx)(o,{...a,...s,...n})})}})}const f=[{path:"/VAME/blog",component:d("/VAME/blog","b98"),exact:!0},{path:"/VAME/blog/archive",component:d("/VAME/blog/archive","5b9"),exact:!0},{path:"/VAME/blog/tags",component:d("/VAME/blog/tags","473"),exact:!0},{path:"/VAME/blog/tags/blog",component:d("/VAME/blog/tags/blog","00f"),exact:!0},{path:"/VAME/blog/tags/vame",component:d("/VAME/blog/tags/vame","cba"),exact:!0},{path:"/VAME/blog/welcome",component:d("/VAME/blog/welcome","a49"),exact:!0},{path:"/VAME/markdown-page",component:d("/VAME/markdown-page","1b1"),exact:!0},{path:"/VAME/docs",component:d("/VAME/docs","2a1"),routes:[{path:"/VAME/docs",component:d("/VAME/docs","f8e"),routes:[{path:"/VAME/docs",component:d("/VAME/docs","708"),routes:[{path:"/VAME/docs/category/api-reference",component:d("/VAME/docs/category/api-reference","2ec"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/category/getting-started",component:d("/VAME/docs/category/getting-started","09e"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/faq",component:d("/VAME/docs/faq","855"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/getting_started/installation",component:d("/VAME/docs/getting_started/installation","2fa"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/getting_started/running",component:d("/VAME/docs/getting_started/running","8ad"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/intro",component:d("/VAME/docs/intro","26d"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/community_analysis",component:d("/VAME/docs/reference/vame/analysis/community_analysis","75c"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/generative_functions",component:d("/VAME/docs/reference/vame/analysis/generative_functions","ace"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/gif_creator",component:d("/VAME/docs/reference/vame/analysis/gif_creator","d38"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/pose_segmentation",component:d("/VAME/docs/reference/vame/analysis/pose_segmentation","20a"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/segment_behavior",component:d("/VAME/docs/reference/vame/analysis/segment_behavior","ef0"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/tree_hierarchy",component:d("/VAME/docs/reference/vame/analysis/tree_hierarchy","e93"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/umap_visualization",component:d("/VAME/docs/reference/vame/analysis/umap_visualization","c51"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/analysis/videowriter",component:d("/VAME/docs/reference/vame/analysis/videowriter","e68"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/initialize_project/new",component:d("/VAME/docs/reference/vame/initialize_project/new","038"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/logging/logger",component:d("/VAME/docs/reference/vame/logging/logger","73b"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/model/create_training",component:d("/VAME/docs/reference/vame/model/create_training","786"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/model/dataloader",component:d("/VAME/docs/reference/vame/model/dataloader","22c"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/model/evaluate",component:d("/VAME/docs/reference/vame/model/evaluate","7bf"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/model/rnn_model",component:d("/VAME/docs/reference/vame/model/rnn_model","b8e"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/model/rnn_vae",component:d("/VAME/docs/reference/vame/model/rnn_vae","cea"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/schemas/states",component:d("/VAME/docs/reference/vame/schemas/states","67b"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/util/align_egocentrical",component:d("/VAME/docs/reference/vame/util/align_egocentrical","cfb"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/util/auxiliary",component:d("/VAME/docs/reference/vame/util/auxiliary","f0a"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/util/csv_to_npy",component:d("/VAME/docs/reference/vame/util/csv_to_npy","6cd"),exact:!0,sidebar:"docsSidebar"},{path:"/VAME/docs/reference/vame/util/gif_pose_helper",component:d("/VAME/docs/reference/vame/util/gif_pose_helper","a73"),exact:!0,sidebar:"docsSidebar"}]}]}]},{path:"/VAME/",component:d("/VAME/","91e"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),a=n(5338),o=n(4625),i=n(545),l=n(8193);const s=[n(119),n(6134),n(6294),n(1043)];var c=n(8328),u=n(6347),d=n(2831),f=n(4848);function p(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var m=n(5260),g=n(4586),h=n(6025),y=n(6342),b=n(1213),v=n(2131),w=n(4090),k=n(2967),x=n(440),S=n(1463);function E(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.A)(),r=(0,v.o)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,f.jsxs)(m.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function _(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.A)(),{pathname:r}=(0,u.zy)();return e+(0,x.applyTrailingSlash)((0,h.A)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:a}),(0,f.jsx)("link",{rel:"canonical",href:a})]})}function A(){const{i18n:{currentLocale:e}}=(0,g.A)(),{metadata:t,image:n}=(0,y.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:w.w})]}),n&&(0,f.jsx)(b.be,{image:n}),(0,f.jsx)(_,{}),(0,f.jsx)(E,{}),(0,f.jsx)(S.A,{tag:k.Cy,locale:e}),(0,f.jsx)(m.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const C=new Map;var T=n(6125),j=n(6988),N=n(205);function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const P=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,N.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),L("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function R(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(c.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class M extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?L("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=L("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),R(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(P,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(u.qh,{location:t,render:()=>e})})}}const O=M,D="__docusaurus-base-url-issue-banner-container",I="__docusaurus-base-url-issue-banner",F="__docusaurus-base-url-issue-banner-suggestion-container";function z(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${D}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}((0,u.zy)());return(0,f.jsx)(O,{location:e,children:G})}function Q(){return(0,f.jsx)(U.A,{children:(0,f.jsx)(j.l,{children:(0,f.jsxs)(T.x,{children:[(0,f.jsxs)(p,{children:[(0,f.jsx)(V,{}),(0,f.jsx)(A,{}),(0,f.jsx)($,{}),(0,f.jsx)(W,{})]}),(0,f.jsx)(H,{})]})})})}var K=n(4054);const Y=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Z=n(6921);const X=new Set,J=new Set,ee=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,te={prefetch:e=>{if(!(e=>!ee()&&!J.has(e)&&!X.has(e))(e))return!1;X.add(e);const t=(0,d.u)(c.A,e).flatMap((e=>{return t=e.route.path,Object.entries(K).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Z.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Y(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!ee()&&!J.has(e))(e)&&(J.add(e),R(e))},ne=Object.freeze(te),re=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=ne;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(i.vd,{children:(0,f.jsx)(o.Kd,{children:(0,f.jsx)(Q,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},l=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(re)window.docusaurusRoot=a.hydrateRoot(e,t,{onRecoverableError:n});else{const r=a.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};R(window.location.pathname).then((()=>{(0,r.startTransition)(l)}))}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/VAME/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/VAME/docs","mainDocId":"intro","docs":[{"id":"faq","path":"/VAME/docs/faq","sidebar":"docsSidebar"},{"id":"getting_started/installation","path":"/VAME/docs/getting_started/installation","sidebar":"docsSidebar"},{"id":"getting_started/running","path":"/VAME/docs/getting_started/running","sidebar":"docsSidebar"},{"id":"intro","path":"/VAME/docs/intro","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/community_analysis","path":"/VAME/docs/reference/vame/analysis/community_analysis","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/generative_functions","path":"/VAME/docs/reference/vame/analysis/generative_functions","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/gif_creator","path":"/VAME/docs/reference/vame/analysis/gif_creator","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/pose_segmentation","path":"/VAME/docs/reference/vame/analysis/pose_segmentation","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/segment_behavior","path":"/VAME/docs/reference/vame/analysis/segment_behavior","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/tree_hierarchy","path":"/VAME/docs/reference/vame/analysis/tree_hierarchy","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/umap_visualization","path":"/VAME/docs/reference/vame/analysis/umap_visualization","sidebar":"docsSidebar"},{"id":"reference/vame/analysis/videowriter","path":"/VAME/docs/reference/vame/analysis/videowriter","sidebar":"docsSidebar"},{"id":"reference/vame/initialize_project/new","path":"/VAME/docs/reference/vame/initialize_project/new","sidebar":"docsSidebar"},{"id":"reference/vame/logging/logger","path":"/VAME/docs/reference/vame/logging/logger","sidebar":"docsSidebar"},{"id":"reference/vame/model/create_training","path":"/VAME/docs/reference/vame/model/create_training","sidebar":"docsSidebar"},{"id":"reference/vame/model/dataloader","path":"/VAME/docs/reference/vame/model/dataloader","sidebar":"docsSidebar"},{"id":"reference/vame/model/evaluate","path":"/VAME/docs/reference/vame/model/evaluate","sidebar":"docsSidebar"},{"id":"reference/vame/model/rnn_model","path":"/VAME/docs/reference/vame/model/rnn_model","sidebar":"docsSidebar"},{"id":"reference/vame/model/rnn_vae","path":"/VAME/docs/reference/vame/model/rnn_vae","sidebar":"docsSidebar"},{"id":"reference/vame/schemas/states","path":"/VAME/docs/reference/vame/schemas/states","sidebar":"docsSidebar"},{"id":"reference/vame/util/align_egocentrical","path":"/VAME/docs/reference/vame/util/align_egocentrical","sidebar":"docsSidebar"},{"id":"reference/vame/util/auxiliary","path":"/VAME/docs/reference/vame/util/auxiliary","sidebar":"docsSidebar"},{"id":"reference/vame/util/csv_to_npy","path":"/VAME/docs/reference/vame/util/csv_to_npy","sidebar":"docsSidebar"},{"id":"reference/vame/util/gif_pose_helper","path":"/VAME/docs/reference/vame/util/gif_pose_helper","sidebar":"docsSidebar"},{"id":"/category/getting-started","path":"/VAME/docs/category/getting-started","sidebar":"docsSidebar"},{"id":"/category/api-reference","path":"/VAME/docs/category/api-reference","sidebar":"docsSidebar"}],"draftIds":[],"sidebars":{"docsSidebar":{"link":{"path":"/VAME/docs/intro","label":"intro"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.3.2","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.3.2"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.3.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.3.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.3.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.3.2"}}}');var c=n(4848);const u={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(u);function f(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6540),a=n(8193),o=n(5260),i=n(440),l=n(781),s=n(3102),c=n(4848);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){let{children:t}=e;return(0,c.jsx)(s.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function p(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(f,{children:(0,c.jsxs)(g,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(o.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(l.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const m=e=>(0,c.jsx)(p,{...e});class g extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(4625),o=n(440),i=n(4586),l=n(6654),s=n(8193),c=n(3427),u=n(6025),d=n(4848);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,i.A)(),{withBaseUrl:k}=(0,u.h)(),x=(0,c.A)(),S=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>S.current));const E=f||p;const _=(0,l.A)(E),A=E?.replace("pathname://","");let C=void 0!==A?(T=A,y&&(e=>e.startsWith("/"))(T)?k(T):T):void 0;var T;C&&_&&(C=(0,o.applyTrailingSlash)(C,{trailingSlash:v,baseUrl:w}));const j=(0,r.useRef)(!1),N=n?a.k2:a.N_,L=s.A.canUseIntersectionObserver,P=(0,r.useRef)(),R=()=>{j.current||null==C||(window.docusaurus.preload(C),j.current=!0)};(0,r.useEffect)((()=>(!L&&_&&null!=C&&window.docusaurus.prefetch(C),()=>{L&&P.current&&P.current.disconnect()})),[P,C,L,_]);const M=C?.startsWith("#")??!1,O=!b.target||"_self"===b.target,D=!C||!_||!O||M;return h||!M&&D||x.collectLink(C),b.id&&x.collectAnchor(b.id),D?(0,d.jsx)("a",{ref:S,href:C,...E&&!_&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(N,{...b,onMouseEnter:R,onTouchStart:R,innerRef:e=>{S.current=e,L&&e&&_&&(P.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(P.current.unobserve(e),P.current.disconnect(),null!=C&&window.docusaurus.prefetch(C))}))})),P.current.observe(e))},to:C,...n&&{isActive:g,activeClassName:m}})}const p=r.forwardRef(f)},418:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>null},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>s});var r=n(6540),a=n(4848);function o(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return o(l({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,h:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.z)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const a=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),o=()=>(0,r.useContext)(a);function i(){return o()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6803:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3102);function o(){const e=r.useContext(a.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const l=a?`${a}.${o}`:o;r(i)?e(i,l):t[l]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848);const o=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(o),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>f,Gy:()=>u,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>p});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,a.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=function(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const c={},u=()=>i("docusaurus-plugin-content-docs")??c,d=e=>{try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});const r=i(e),a=r?.[t];if(!a&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function f(e){void 0===e&&(e={});const t=u(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function p(e){return d(e).versions}function m(e){const t=d(e);return l(t)}function g(e){const t=d(e),{pathname:n}=(0,r.zy)();return s(t,n)}function h(e){const t=d(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6134:(e,t,n)=>{"use strict";n.r(t);var r=n(1765),a=n(4784);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8692)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(4164),a=n(1312),o=n(6342),i=n(8774),l=n(3427);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(4848);function u(e){let{as:t,id:n,...u}=e;const d=(0,l.A)(),{navbar:{hideOnScroll:f}}=(0,o.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const p=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",f?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":p,title:p,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(4848);function o(e){let{width:t=13.5,height:n=13.5}=e;return(0,a.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},781:(e,t,n)=>{"use strict";n.d(t,{A:()=>pt});var r=n(6540),a=n(4164),o=n(7489),i=n(1213),l=n(6347),s=n(1312),c=n(5062),u=n(4848);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:r}=p();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(g,{className:b.skipToContent})}var w=n(6342),k=n(5041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:a=1.2,className:o,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:a,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function E(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,a.A)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function A(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,a.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function T(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.Mj)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:o}=e;return(0,u.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:r,color:a},role:"banner",children:[o&&(0,u.jsx)("div",{className:C.announcementBarPlaceholder}),(0,u.jsx)(A,{className:C.announcementBarContent}),o&&(0,u.jsx)(E,{onClick:n,className:C.announcementBarClose})]})}var j=n(9876),N=n(3104);var L=n(9532),P=n(5600);const R=r.createContext(null);function M(e){let{children:t}=e;const n=function(){const e=(0,j.M)(),t=(0,P.YL)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,L.ZC)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return(0,u.jsx)(R.Provider,{value:n,children:t})}function O(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function D(){const e=(0,r.useContext)(R);if(!e)throw new L.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,P.YL)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:O(o)})),[a,o,t])}function I(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:o}=D();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(5293),z=n(2303);function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const V={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function U(e){let{className:t,buttonClassName:n,value:r,onChange:o}=e;const i=(0,z.A)(),l=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.A)(V.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.A)("clean-btn",V.toggleButton,!i&&V.toggleButtonDisabled,n),type:"button",onClick:()=>o("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite",children:[(0,u.jsx)(B,{className:(0,a.A)(V.toggleIcon,V.lightToggleIcon)}),(0,u.jsx)($,{className:(0,a.A)(V.toggleIcon,V.darkToggleIcon)})]})})}const q=r.memo(U),H={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,F.G)();return r?null:(0,u.jsx)(q,{className:t,buttonClassName:"dark"===n?H.darkNavbarColorModeToggle:void 0,value:a,onChange:o})}var W=n(3465);function Q(){return(0,u.jsx)(W.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,j.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Q,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(K,{})]})}var Z=n(8774),X=n(6025),J=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:a,label:o,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...c}=e;const d=(0,X.A)(r),f=(0,X.A)(t),p=(0,X.A)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,J.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,m&&(0,u.jsx)(te.A,{...l&&{width:12,height:12}})]})};return a?(0,u.jsx)(Z.A,{href:s?p:a,...c,...g}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},...c,...g})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const o=(0,u.jsx)(ne,{className:(0,a.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:o}):o}function ae(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,a.A)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const a=t?ae:re;return(0,u.jsx)(a,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),le=n(9169),se=n(4586);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:o,onClick:i,...l}=e;const s=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,u.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",o),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:l.children??l.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(_e,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:o,onClick:i,...s}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,se.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,u.jsx)(ne,{role:"button",className:(0,a.A)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),p()},children:s.children??s.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(_e,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,u.jsx)(r,{...n})}var me=n(2131);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";var ye=n(418);const be={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,a.A)(n,be.navbarSearchContainer),children:t})}var we=n(4070),ke=n(1754);var xe=n(5597);const Se=e=>e.docs.find((t=>t.id===e.mainDocId));const Ee={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:a="",...o}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,se.A)(),f=(0,me.o)(),{search:p,hash:m}=(0,l.zy)(),g=[...n,...c.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}${a}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(pe,{...o,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(ve,{className:n,children:(0,u.jsx)(ye.A,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:o=!1}=e;const i=o?"li":"div";return(0,u.jsx)(i,{className:(0,a.A)({navbar__item:!r&&!o,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,we.zK)(r),i=(0,ke.QB)(t,r),l=o?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>l||!!o?.sidebar&&o.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,we.zK)(r),i=(0,ke.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>o?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...a}=e;const o=(0,ke.Vd)(r)[0],i=t??o.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return(0,u.jsx)(oe,{...a,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:a,dropdownItemsAfter:o,...i}=e;const{search:c,hash:d}=(0,l.zy)(),f=(0,we.zK)(n),p=(0,we.jh)(n),{savePreferredVersionName:m}=(0,xe.g1)(n),g=[...a,...p.map((e=>{const t=f.alternateDocVersions[e.name]??Se(e);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>m(e.name)}})),...o],h=(0,ke.Vd)(n)[0],y=t&&g.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=t&&g.length>1?void 0:Se(h).path;return g.length<=1?(0,u.jsx)(oe,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(pe,{...i,mobile:t,label:y,to:b,items:g,isActive:r?()=>!1:void 0})}};function _e(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Ee[r];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(a,{...n})}function Ae(){const e=(0,j.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(_e,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ce(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Te(){const e=0===(0,w.p)().navbar.items.length,t=D();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Ce,{onClick:()=>t.hide()}),t.content]})}function je(){const e=(0,j.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(I,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(Ae,{}),secondaryMenu:(0,u.jsx)(Te,{})}):null}const Ne={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Le(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,a.A)("navbar-sidebar__backdrop",e.className)})}function Pe(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.p)(),i=(0,j.M)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,N.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:l,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.A)("navbar","navbar--fixed-top",n&&[Ne.navbarHideable,!d&&Ne.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Le,{onClick:i.toggle}),(0,u.jsx)(je,{})]})}var Re=n(440);const Me={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Oe(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function De(e){let{error:t}=e;const n=(0,Re.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Me.errorBoundaryError,children:n})}class Ie extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Fe="right";function ze(e){let{width:t=30,height:n=30,className:r,...a}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...a,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Be(){const{toggle:e,shown:t}=(0,j.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(ze,{})})}const $e={colorModeToggle:"colorModeToggle_DEke"};function Ve(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Ie,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(_e,{...e})},t)))})}function Ue(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function qe(){const e=(0,j.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Fe)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return(0,u.jsx)(Ue,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Be,{}),(0,u.jsx)(Q,{}),(0,u.jsx)(Ve,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ve,{items:r}),(0,u.jsx)(G,{className:$e.colorModeToggle}),!a&&(0,u.jsx)(ve,{children:(0,u.jsx)(ye.A,{})})]})})}function He(){return(0,u.jsx)(Pe,{children:(0,u.jsx)(qe,{})})}function Ge(e){let{item:t}=e;const{to:n,href:r,label:a,prependBaseUrlToHref:o,...i}=t,l=(0,X.A)(n),s=(0,X.A)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:"footer__link-item",...r?{href:o?s:r}:{to:l},...i,children:[a,r&&!(0,J.A)(r)&&(0,u.jsx)(te.A,{})]})}function We(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(Ge,{item:t})},t.href??t.to)}function Qe(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(We,{item:e},t)))})]})}function Ke(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(Qe,{column:e},t)))})}function Ye(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Ze(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(Ge,{item:t})}function Xe(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(Ze,{item:e}),t.length!==n+1&&(0,u.jsx)(Ye,{})]},n)))})})}function Je(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(Ke,{columns:t}):(0,u.jsx)(Xe,{links:t})}var et=n(1122);const tt={footerLogoLink:"footerLogoLink_BH7S"};function nt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.h)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(et.A,{className:(0,a.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function rt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:tt.footerLogoLink,target:t.target,children:(0,u.jsx)(nt,{logo:t})}):(0,u.jsx)(nt,{logo:t})}function at(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function ot(e){let{style:t,links:n,logo:r,copyright:o}=e;return(0,u.jsx)("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||o)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),o]})]})})}function it(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:a}=e;return(0,u.jsx)(ot,{style:a,links:n&&n.length>0&&(0,u.jsx)(Je,{links:n}),logo:r&&(0,u.jsx)(rt,{logo:r}),copyright:t&&(0,u.jsx)(at,{copyright:t})})}const lt=r.memo(it),st=(0,L.fM)([F.a,k.oq,N.Tv,xe.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(P.y_,{children:(0,u.jsx)(j.e,{children:(0,u.jsx)(M,{children:t})})})}]);function ct(e){let{children:t}=e;return(0,u.jsx)(st,{children:t})}var ut=n(1107);function dt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(ut.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Oe,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(De,{error:t})})]})})})}const ft={mainWrapper:"mainWrapper_z2l0"};function pt(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,y.J)(),(0,u.jsxs)(ct,{children:[(0,u.jsx)(i.be,{title:l,description:s}),(0,u.jsx)(v,{}),(0,u.jsx)(T,{}),(0,u.jsx)(He,{}),(0,u.jsx)("div",{id:d,className:(0,a.A)(h.G.wrapper.main,ft.mainWrapper,r),children:(0,u.jsx)(o.A,{fallback:e=>(0,u.jsx)(dt,{...e}),children:t})}),!n&&(0,u.jsx)(lt,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(8774),a=n(6025),o=n(4586),i=n(6342),l=n(1122),s=n(4848);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,a.A)(t.src),dark:(0,a.A)(t.srcDark||t.src)},i=(0,s.jsx)(l.A,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,o.A)(),{navbar:{title:n,logo:l}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...f}=e,p=(0,a.A)(l?.href||"/"),m=n?"":t,g=l?.alt??m;return(0,s.jsxs)(r.A,{to:p,...f,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(c,{logo:l,alt:g,imageClassName:u}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6540),a=n(4164),o=n(2303),i=n(5293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(4848);function c(e){let{className:t,children:n}=e;const c=(0,o.A)(),{colorMode:u}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const o=n({theme:e,className:(0,a.A)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:o},e)}))})}function u(e){const{sources:t,className:n,alt:r,...a}=e;return(0,s.jsx)(c,{className:n,children:e=>{let{theme:n,className:o}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:o,...a})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(6540),a=n(8193),o=n(205),i=n(3109),l=n(4848);const s="ease-in-out";function c(e){let{initialState:t}=e;const[n,a]=(0,r.useState)(t??!1),o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return{collapsed:n,setCollapsed:a,toggleCollapsed:o}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:a}=e;const o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=a?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${a?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return f(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,a])}function m(e){if(!a.A.canUseDOM)return e?u:d}function g(e){let{as:t="div",collapsed:n,children:a,animation:o,onCollapseTransitionEnd:i,className:s,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return p({collapsibleRef:u,collapsed:n,animation:o}),(0,l.jsx)(t,{ref:u,style:c?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(u.current,n),i?.(n))},className:s,children:a})}function h(e){let{collapsed:t,...n}=e;const[a,i]=(0,r.useState)(!t),[s,c]=(0,r.useState)(t);return(0,o.A)((()=>{t||i(!0)}),[t]),(0,o.A)((()=>{a&&c(t)}),[a,t]),a?(0,l.jsx)(g,{...n,collapsed:s}):null}function y(e){let{lazy:t,...n}=e;const r=t?h:g;return(0,l.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>g,oq:()=>m});var r=n(6540),a=n(2303),o=n(9466),i=n(9532),l=n(6342),s=n(4848);const c=(0,o.Wf)("docusaurus.announcement.dismiss"),u=(0,o.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),f=e=>c.set(String(e)),p=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,a.A)(),[n,o]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{o(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&f(!1),!r&&d()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>h});var r=n(6540),a=n(8193),o=n(9532),i=n(9466),l=n(6342),s=n(4848);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,m=e=>a.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),g=e=>{d.set(p(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[a,o]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&g(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[a,i])}();return(0,s.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(1754),s=n(9532),c=n(9466),u=n(4848);const d=e=>`docs-preferred-version-${e}`,f={save:(e,t,n)=>{(0,c.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.Wf)(d(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function g(){const e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=f.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(f.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){f.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return l.C5?(0,u.jsx)(h,{children:t}):(0,u.jsx)(u.Fragment,{children:t})}function b(){const e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.W);const t=(0,a.ht)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},6588:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>c});var r=n(6540),a=n(9532),o=n(4848);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:a}=e;const i=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},9876:(e,t,n)=>{"use strict";n.d(t,{e:()=>p,M:()=>m});var r=n(6540),a=n(5600),o=n(4581),i=n(6347),l=n(9532);function s(e){!function(e){const t=(0,i.W6)(),n=(0,l._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var c=n(6342),u=n(4848);const d=r.createContext(void 0);function f(){const e=function(){const e=(0,a.YL)(),{items:t}=(0,c.p)().navbar;return 0===t.length&&!e.component}(),t=(0,o.l)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1);s((()=>{if(i)return l(!1),!1}));const u=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:i})),[e,n,u,i])}function p(e){let{children:t}=e;const n=f();return(0,u.jsx)(d.Provider,{value:n,children:t})}function m(){const e=r.useContext(d);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>s,y_:()=>l});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");const[,l]=o,s=(0,a.Be)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,l]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){l(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},1754:(e,t,n)=>{"use strict";n.d(t,{d1:()=>C,Nr:()=>m,w8:()=>b,C5:()=>f,$S:()=>g,cC:()=>p,B5:()=>A,Vd:()=>S,QB:()=>_,fW:()=>E,OF:()=>x,Y:()=>w});var r=n(6540),a=n(6347),o=n(2831),i=n(4070),l=n(5597),s=n(2252),c=n(6588);function u(e){return Array.from(new Set(e))}var d=n(9169);const f=!!i.Gy;function p(e){const t=(0,s.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=m(t);if(e)return e}}(e):void 0:e.href}function g(){const{pathname:e}=(0,a.zy)(),t=(0,c.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=k({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,d.ys)(e,t),y=(e,t)=>e.some((e=>b(e,t)));function b(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||y(e.items,t))}function v(e,t){switch(e.type){case"category":return b(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||b(e,t);default:return!0}}function w(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function k(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.ys)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.ys)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function x(){const e=(0,c.t)(),{pathname:t}=(0,a.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?k({sidebarItems:e.items,pathname:t}):null}function S(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,l.g1)(e),a=(0,i.r7)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function E(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function _(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function A(e){let{route:t}=e;const n=(0,a.zy)(),r=(0,s.r)(),i=t.routes,l=i.find((e=>(0,a.B6)(n.pathname,e)));if(!l)return null;const c=l.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,o.v)(i),sidebarName:c,sidebarItems:u}}function C(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!m(e)))}},1213:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>u,Jx:()=>p});var r=n(6540),a=n(4164),o=n(5260),i=n(6803),l=n(6025),s=n(4586);var c=n(4848);function u(e){let{title:t,description:n,keywords:r,image:a,children:i}=e;const u=function(e){const{siteConfig:t}=(0,s.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.h)(),f=a?d(a,{absolute:!0}):void 0;return(0,c.jsxs)(o.A,{children:[t&&(0,c.jsx)("title",{children:u}),t&&(0,c.jsx)("meta",{property:"og:title",content:u}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,c.jsx)("meta",{property:"og:image",content:f}),f&&(0,c.jsx)("meta",{name:"twitter:image",content:f}),i]})}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),l=(0,a.A)(i,t);return(0,c.jsxs)(d.Provider,{value:l,children:[(0,c.jsx)(o.A,{children:(0,c.jsx)("html",{className:l})}),n]})}function p(e){let{children:t}=e;const n=(0,i.A)(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(f,{className:(0,a.A)(r,o),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>l,_q:()=>i,dV:()=>s,fM:()=>u});var r=n(6540),a=n(205),o=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,a.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,a.A)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,o.jsx)(o.Fragment,{children:e.reduceRight(((e,t)=>(0,o.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>c,gk:()=>p});var r=n(6540),a=n(8193),o=n(2303),i=(n(205),n(9532)),l=n(4848);const s=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(s.Provider,{value:n,children:t})}function u(){const e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const d=()=>a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function p(){const e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>r,tU:()=>a});n(4586);const r="default";function a(e,t){return`docs-${e}-${t}`}},9466:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>s});n(6540);const r="localStorage";function a(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function o(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const l={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function s(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=o(t?.persistence);return null===n?l:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.A)(),{pathname:s}=(0,a.zy)(),c=(0,o.applyTrailingSlash)(s,{trailingSlash:n,baseUrl:e}),u=l===i?e:e.replace(`/${l}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(9532);function i(e){const t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=void 0;const r=n(2566);function a(e){return e.endsWith("/")?e:`${e}/`}function o(e){return(0,r.removeSuffix)(e,"/")}t.addTrailingSlash=a,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),l="/"===i||i===r?i:(s=i,n?a(s):o(s));var s;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}}),Object.defineProperty(t,"addTrailingSlash",{enumerable:!0,get:function(){return a.addTrailingSlash}}),Object.defineProperty(t,"addLeadingSlash",{enumerable:!0,get:function(){return a.addLeadingSlash}}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return a.removeTrailingSlash}});var o=n(2566);Object.defineProperty(t,"addPrefix",{enumerable:!0,get:function(){return o.addPrefix}}),Object.defineProperty(t,"removeSuffix",{enumerable:!0,get:function(){return o.removeSuffix}}),Object.defineProperty(t,"addSuffix",{enumerable:!0,get:function(){return o.addSuffix}}),Object.defineProperty(t,"removePrefix",{enumerable:!0,get:function(){return o.removePrefix}});var i=n(253);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=void 0,t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){return""===t?e:e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>A,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),g=s(n),h=0;h{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),a=n(8380),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),o.add(e)}))}i.silent=!1,e.exports=i},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof c?l.splice.apply(l,[s,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(Prism)},8692:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8692},3157:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var f,p=r(s),m=u;a(m);){for(var g in f={},m){var h=s[g];t(h&&h.modify,(function(e){e in d&&(f[e]=!0)}))}for(var y in d)if(!(y in u))for(var b in p(y))if(b in u){f[y]=!0;break}for(var v in m=f)u[v]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var f=i(u.map((function(e){var t=c(e);return delete s[e],t})));o?a=o(f,(function(){return r(e)})):r(e)}return l[e]=a}for(var u in n)c(u);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n