Open FlyingFordAnglia opened 1 week ago
Currently, basis objects assume a single input, and addressing this issue is a work-in-progress. The current work-around is to define a basis in param_grid
that matches the dimensionality of the input; in your case, this will be an additive basis with the number of components (RaisedCosineBasisLinear
bases) equal to the number of neurons. This will look like:
param_grid = dict(
glm__regularizer_strength=(0.1, 0.01, 0.001, 1e-5),
transformerbasis__basis=[basis*neuron],
)
where basis*neuron
is shorthand for adding basis
together neuron
times. Unfortunately, this solution will raise another error in both main and dev branches having to do with transformer basis property names (as well as the shorthand not existing). This issue is being fixed in PR #235, but you can try it out in the meantime by using the fix_transformer
branch in nemos if you've installed it from source. Let me know if this works for you!
Hi! I am trying to fit a glm to some spiking data from a bunch of neurons. My design matrix is the binned spike counts of all neurons, and my 'y' is the spike counts of the neuron I am interested in. Before fitting the glm, I wanted to run a grid search for hyperparameter tuning. When I run the attached code, I get the following error:
From what I can gather, it appears that the fit_transform method that gridsearchCV uses internally expects a design matrix with a single column, not a matrix of n_samples, n_features. How can I get this to work?
My installed nemos version is 0.1.6 and sklearn version is 1.5.0
A tangential question: How do I integrate batch gradient descent with this pipeline?
Any help would be appreciated, thanks!