https://abuzarmahmood.github.io/pytau/
- Perform inter-region transition correlations on models fit to each taste individually
# Create and activate conda environment
conda create -n "pytau_env" python=3.6.13 ipython notebook -y
conda activate pytau_env
# Clone repository
cd ~/Desktop
git clone https://github.com/abuzarmahmood/pytau.git
# Install requirements from specified file
cd pytau
pip install -r requirements.txt
# Test everything is working by running notebook
cd pytau/how_to
bash scripts/download_test_data.sh
cd notebooks
jupyter notebook
# Run a notebook
- Models stored in CENTRAL LOCATION and accessed by indexing an info file, which also contains model parameters and metadata
- Metadata also stored in model file to be able to recreate info file in case something happens
Database for models fit:
- Columns:
-
Model save path
-
Animal Name
-
Session date
-
Taste Name
-
Region Name
-
Experiment name (user-given name to separate batches of fits)
-
Fit Date
-
Model parameters:
- Model Type (See below)
- Data Type (Shuffled, simulated, actual)
- States Num
- Fit steps
- Time lims
- Bin Width
-
Data stored in models: - Model - Approx - Lambda - Tau - Data used to fit model - Raw data (before preprocessing to feed to model) - Model and data details/parameters (as above)
- Considering we might want to compare different model types:
- Unconstrained sequantial
- Baised transition priors, sequential
- Hard padding between transitions, sequential
- Joint region model We need to have a standardized pipeline for fitting and retrieving these models
-
Model file
-
Invoked to generate model and perform inference
-
Currently <<poisson_all_tastes_changepoint_model.py>>
-
Should be agnostic to, and ignorant of what type of data is being fed. Should only fit model and return output
-
These should be functions
-
Input:
- Processed spike trains
- Model parameters (model type, states, fit steps)
-
Output:
- Model
- Approx
- Lambda
- Tau
- Data used to fit model
-
-
Data pre-processing code:
-
Currently <<changepoint_fit.py>>
-
Should handle different data "types" (shuffle, simulated, actual)
-
These should be functions
-
Input:
- Raw spike trains
- Spike train parameters (time lims, binning)
- Desired data type
-
Output:
- Processed spike trains
-
-
I/O helper code
- Takes data path and model parameters
- If model has not been fit, runs fit, else pulls model from memory
- This should be a "data_handler" class that can load, process, and return the data, write data to file, and write an entry in the database
- The model creation and model fit functions can be imported as methods to
streamline fitting
Operations:
- Loads data from HDF5, preprocesses, and feeds to modeling code
- Collects outputs from modeling code, and combines with appropriate metadata
- Writes model file to appropriate directory
- Row with fit data appended to central dataframe
- Takes data path and model parameters
-
Run script
- Script to iterate over data
- Input:
- List of data to iterate over
- Parallelization
- Parallelization is currently performed using GNU Parallel by setting separate a theano compiledir for each job. This prevents compilation clashes. Refer to this file and this commit