API Reference#
The nemos.glm
module#
Classes for creating Generalized Linear Models (GLMs) for both single neurons and neural populations.
Generalized Linear Model (GLM) for neural activity data. |
|
Population Generalized Linear Model. |
The nemos.basis
module#
Provides basis function classes to construct and transform features for model inputs. Basis can be grouped according to the mode of operation into basis that performs convolution and basis that operates as non-linear maps.
The Abstract Classes:
These classes are the building blocks for the concrete basis classes.
Abstract base class for defining basis functions for feature transformation. |
SplineBasis class inherits from the Basis class and represents spline basis functions. |
Bases For Convolution:
M-spline basis functions for modeling and data transformation. |
|
B-spline 1-dimensional basis functions. |
|
B-spline 1-dimensional basis functions for cyclic splines. |
|
Represent linearly-spaced raised cosine basis functions. |
|
Represent log-spaced raised cosine basis functions. |
|
Set of 1D basis decaying exponential functions numerically orthogonalized. |
|
Basis for history effects. |
Bases For Non-Linear Mapping:
M-spline basis functions for modeling and data transformation. |
|
B-spline 1-dimensional basis functions. |
|
B-spline 1-dimensional basis functions for cyclic splines. |
|
Represent linearly-spaced raised cosine basis functions. |
|
Represent log-spaced raised cosine basis functions. |
|
Set of 1D basis decaying exponential functions numerically orthogonalized. |
|
Identity basis function. |
Composite Bases:
Class representing the addition of two Basis objects. |
|
Class representing the multiplication (external product) of two Basis objects. |
Basis As ``scikit-learn`` Tranformers:
Basis as |
The nemos.observation_models
module#
Statistical models to describe the distribution of neural responses or other predicted variables, given inputs.
Abstract observation model class for neural data processing. |
|
Model observations as Poisson random variables. |
|
Model observations as Gamma random variables. |
The nemos.regularizer
module#
Implements various regularization techniques to constrain model parameters, which helps prevent overfitting.
Abstract base class for regularized solvers. |
|
Regularizer class for unregularized models. |
|
Regularizer class for Ridge (L2 regularization). |
|
Regularizer class for Lasso (L1 regularization). |
|
Regularizer class for Group Lasso (group-L1) regularized models. |
The nemos.simulation
module#
Utility functions for simulating spiking activity in recurrently connected neural populations.
Simulate neural activity using the GLM as a recurrent network. |
|
Generate coupling filter as a Gamma pdf difference. |
|
Approximate scipy.stats.gamma based filters with basis function. |
The nemos.convolve
module#
Utility functions for running convolution over the sample axis.
Create a convolutional predictor by convolving a basis matrix with a time series. |
|
Apply a convolution on the given array with the evaluation basis and reshapes the result. |
The nemos.identifiability_constraints
module#
Functions to apply identifiability constraints to rank-deficient feature matrices, ensuring the uniqueness of model solutions.
Apply identifiability constraints to a design matrix |
|
Apply identifiability constraint to a design matrix for each component of an additive basis. |
The nemos.pytrees.FeaturePytree
class#
Class for storing the input arrays in a dictionary. Keys are usually variable names. These objects can be provided as input to nemos GLM methods.
Pytree to represent GLM features. |