[Ann] New toolbox: brian2modelfitting

7 views
Skip to first unread message

Marcel Stimberg

unread,
Sep 25, 2019, 5:30:07 AM9/25/19
to brian-de...@googlegroups.com, brians...@googlegroups.com

We are delighted to announce the first (beta) release of the brian2modelfitting package, a model fitting toolbox for Brian 2. This toolbox enables you to fit a Brian 2 single cell model to spike train or trace data (e.g. from current-clamp or voltage-clamp recordings). Models can be simultaneously optimized over several inputs (e.g. currents), using global, gradient-free optimization methods (provided by the Nevergrad package), or using Bayesian optimization (provided by scikit-optimize).

The package can be installed from pypi (note that the package requires Python 3):

    pip install brian2modelfitting

Please have a look at the documentation for more details: https://brian2modelfitting.readthedocs.io/

This project is the result of Aleskandra Teska's hard work over the summer as part of the Google Summer of Code 2019 (under the umbrella of the INCF organization). Since this is a first release, there are certainly still bugs and small inconveniences, do not hesitate to let us know via the github bug tracker. For more general discussions, also feel free to start a discussion on the brian-de...@googlegroups.com mailing list.

Mario Negrello

unread,
Oct 1, 2019, 7:16:47 AM10/1/19
to brian-de...@googlegroups.com
Dear Marcel and Brian Community,

I have created a weigth matrix W and I wish to connect the entries, but i struggle. The weight matrix i create looks like this. Colors indicate connections across specific population types (1 for Excitatory-Excitatory, for example).

I wish to pass a slice of this matrix to connect, for instance, Excitatory to Excitatory neurons. as such:

W_ee = W[:N_excit,:N_excit]>0
Sbla = Synapses(E_neurons, E_neurons)
Sbla.connect(E_neurons, E_neurons,W_ee)

But I get a type error:

TypeError: condition argument must be bool or string. If you want to connect based on indices, use connect(i=..., j=...)

In my understanding from synapses.connnect, it should be possible to pass a matrix. Can you spot what I’m doing wrong?

Thanks heaps!

Mario Negrello




--
You received this message because you are subscribed to the Google Groups "Brian Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brian-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brian-development/e7624841-ae20-11f9-efb2-fbc70609d8c8%40inserm.fr.

Marcel Stimberg

unread,
Oct 7, 2019, 6:10:39 AM10/7/19
to Brian Development
Hi Mario,

you seem to be using something similar to the Connection class syntax from Brian1, please have a look at the documentation on how to use values from a weight matrix in Brian 2: https://brian2.readthedocs.io/en/stable/introduction/brian1_to_2/synapses.html#weight-matrices

Best,
  Marcel

PS: To ask a new question, please write a new mail instead of replying to another mail (in this case, the announcement mail for the model fitting toolbox) to post to the mailing list, otherwise this messes up the discussion threads in the web interface. Also, this should rather go to brians...@googlegroups.com .

Mario Negrello

unread,
Oct 7, 2019, 8:50:46 AM10/7/19
to brian-de...@googlegroups.com
Thanks Marcel, and indeed, sorry for the mistaken cross post!

--
You received this message because you are subscribed to the Google Groups "Brian Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brian-developm...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages