Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/_static/NG-RC-vs-Traditional-RC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/quickstart/analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
}
},
"source": [
"In the ``Bifurcation1D`` analyzer, ``model`` refers to the modelto be analyzed (essentially the analyzer will access the derivative function in the model), ``target_vars`` denotes the target variables, ``target_pars`` denotes the changing parameters, and ``resolution`` determines the resolutioin of the analysis."
"In the ``Bifurcation1D`` analyzer, ``model`` refers to the model to be analyzed (essentially the analyzer will access the derivative function in the model), ``target_vars`` denotes the target variables, ``target_pars`` denotes the changing parameters, and ``resolution`` determines the resolutioin of the analysis."
]
},
{
Expand Down
7 changes: 1 addition & 6 deletions docs/quickstart/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,12 @@ Alternatively, you can download the preferred release ".whl" file for jaxlib, an
pip install jax


.. warning::
For m1 macOS users, you should run your python environment on ``Apple`` silicon instead of ``intel``
silicon since ``rosetta2`` cannot translate ``jaxlib``. One suggestion is uninstall miniconda3 and install
miniforge3 for managing your python environment.

Windows
^^^^^^^

For **Windows** users, JAX can be installed by the following methods:

- **Method 1**: There are several community supported Windows build for jax, please refer
- **Method 1**: There are several communities support JAX for Windows, please refer
to the github link for more details: https://github.com/cloudhan/jax-windows-builder .
Simply speaking, the provided binary releases of JAX for Windows
are available at https://whls.blob.core.windows.net/unstable/index.html .
Expand Down
51 changes: 22 additions & 29 deletions docs/quickstart/simulation.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/quickstart/training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"source": [
"In recent years, we saw the revolution that training a dynamical system from data or tasks has provided important insights to understand brain functions. To support this, BrainPy porvides various interfaces to help users train dynamical systems. "
"In recent years, we saw the revolution that training a dynamical system from data or tasks has provided important insights to understand brain functions. To support this, BrainPy provides various interfaces to help users train dynamical systems."
]
},
{
Expand Down Expand Up @@ -743,7 +743,7 @@
}
},
"source": [
"Here, we demonstrate how to train an artificial recurrent neural network by using a white noise integration task. In this task, we want our trained RNN model has the ability to integrate white noise. For example, if we has a time series of noise data, "
"Here, we demonstrate how to train an artificial recurrent neural network by using a white noise integration task. In this task, we want our trained RNN model has the ability to integrate white noise. For example, if we have a time series of noise data,"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial_analysis/decision_making_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"source": [
"In this section, we are going to use the [low-dimensional analyzers](./lowdim_analysis.ipynb) to make phase plane and bifurcation analysis for the decision making model proposed by (Wong & Wang) [1]. "
"In this section, we are going to use the [low-dimensional analyzers](./lowdim_analysis.ipynb) to make phase plane and bifurcation analysis for the decision-making model proposed by (Wong & Wang) [1]."
]
},
{
Expand Down Expand Up @@ -203,7 +203,7 @@
}
},
"source": [
"The advantage of the reduced model is that we can understand what dynamical behaviors the model generate for a particular parmeter set using phase-plane analysis and the explore how this behavior changed when the model parameters are variaed (bifurcation analysis). \n",
"The advantage of the reduced model is that we can understand what dynamical behaviors the model generate for a particular parmeter set using phase-plane analysis and the explore how this behavior changed when the model parameters are varied (bifurcation analysis).\n",
"\n",
"To this end, we will use ``brainpy.analysis`` module. "
]
Expand Down Expand Up @@ -517,7 +517,7 @@
}
},
"source": [
"To see how the ohase portrait of the system changed when we chang the stimulus current, we will generate a bifucation diagram for the reduced model. On the bifurcation diagram the fixed points of the model are shown as a function of a changing parameter. \n",
"To see how the phase portrait of the system changed when we chang the stimulus current, we will generate a bifurcation diagram for the reduced model. On the bifurcation diagram the fixed points of the model are shown as a function of a changing parameter.\n",
"\n",
"In the next, we generate bifurcation diagrams with the different parameters. "
]
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorial_analysis/highdim_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
}
},
"source": [
"``brainpy.analysis.SlowPointFinder`` is aimed to find slow/fixed points of high-dimensional systems. Of course, it can optimize to find fixed points of low-dimensional systems. We take the 2D decision making system as an example. "
"``brainpy.analysis.SlowPointFinder`` is aimed to find slow/fixed points of high-dimensional systems. Of course, it can optimize to find fixed points of low-dimensional systems. We take the 2D decision-making system as an example."
]
},
{
Expand Down Expand Up @@ -515,7 +515,7 @@
{
"cell_type": "markdown",
"source": [
"The following code demonstrates how to use ``SlowPointFinder`` to find fixed points of a continous-attractor neural network."
"The following code demonstrates how to use ``SlowPointFinder`` to find fixed points of a continuous attractor neural network."
],
"metadata": {
"collapsed": false,
Expand Down Expand Up @@ -569,7 +569,7 @@
{
"cell_type": "markdown",
"source": [
"The found fixed points are a series of attractor. We can visualized this line of attractors on a 2D space."
"The found fixed points are a series of attractor. We can visualize this line of attractors on a 2D space."
],
"metadata": {
"collapsed": false,
Expand Down
22 changes: 11 additions & 11 deletions docs/tutorial_analysis/lowdim_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}
},
"source": [
"As known to us all, this functuon has multiple fixed points ($\\frac{dx}{dt} = 0$) when $I=0$."
"As known to us all, this function has multiple fixed points ($\\frac{dx}{dt} = 0$) when $I=0$."
]
},
{
Expand Down Expand Up @@ -269,7 +269,7 @@
}
},
"source": [
"Yeah, absolutelty, ``brainpy.analysis.PhasePlane1D`` gives us the right fixed points, and correctly evalutes the stability of these fixed points. "
"Yeah, absolutelty, ``brainpy.analysis.PhasePlane1D`` gives us the right fixed points, and correctly evaluates the stability of these fixed points."
]
},
{
Expand All @@ -280,7 +280,7 @@
}
},
"source": [
"Phase plane is important, because it give us the intuitive understanding how the system evolves with the given parameters. However, in most cases where we care about how the parameters affect the system behaviors, we should make bifurcation analysis. [brainpy.analysis.Bifurcation1D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.Bifurcation1D.rst) is a convenient interface to help you get the insights of how the dynamics of a 1D system changes with parameters. \n",
"Phase plane is important, because it gives us the intuitive understanding how the system evolves with the given parameters. However, in most cases where we care about how the parameters affect the system behaviors, we should make bifurcation analysis. [brainpy.analysis.Bifurcation1D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.Bifurcation1D.rst) is a convenient interface to help you get the insights of how the dynamics of a 1D system changes with parameters.\n",
"\n",
"Similar to ``brainpy.analysis.PhasePlane1D``, ``brainpy.analysis.Bifurcation1D`` receives arguments like \"model\", \"target_vars\", \"pars_update\", and \"resolutions\". Besides, one more important argument **\"target_pars\"** should be provided, which specifies the range of the target parameter in bifurcation analysis."
]
Expand All @@ -293,7 +293,7 @@
}
},
"source": [
"Here, we systematically change the parameter \"Iext\" from 0 to 1.5. According to the bifurcation theory, we know this simple system has a fold bifurcation when $I=1.0$. Because at $I=1.0$, two fixed points collide with each other into a saddle point and then disappear. Does BrainPy's analysis toolkit ``brainpy.analysis.Bifurcation1D`` is capable of performing these analysis? Let's make a try."
"Here, we systematically change the parameter \"Iext\" from 0 to 1.5. According to the bifurcation theory, we know this simple system has a fold bifurcation when $I=1.0$. Because at $I=1.0$, two fixed points collide with each other into a saddle point and then disappear. Does BrainPy's analysis toolkit ``brainpy.analysis.Bifurcation1D`` is capable of performing these analyses? Let's make a try."
]
},
{
Expand Down Expand Up @@ -355,7 +355,7 @@
}
},
"source": [
"It is worthy to note that bifurcation analysis in BrainPy is hard to find out the saddle point (when $I=0$ for this system). This is because the saddle point at the bifurcation just exists at a moment. While the numerical method used in BrainPy analysis toolkit is almost impossible to evaluate the point exactly at the saddle. However, if the user has the minimal knowledge about the bifurcation theory, saddle point (the collision point of two fixed points) can be easily infered from the fixed point evolution."
"It is worthy to note that bifurcation analysis in BrainPy is hard to find out the saddle point (when $I=0$ for this system). This is because the saddle point at the bifurcation just exists at a moment. While the numerical method used in BrainPy analysis toolkit is almost impossible to evaluate the point exactly at the saddle. However, if the user has the minimal knowledge about the bifurcation theory, saddle point (the collision point of two fixed points) can be easily inferred from the fixed point evolution."
]
},
{
Expand Down Expand Up @@ -388,10 +388,10 @@
}
},
"source": [
"Phase plane analysis is one of the most important techniques for studying the behavior of nonlinear systems, since there is usually no analytical solution for a nonlinear system. BrainPy can help users to plot phase plane of 1D systems or 2D systems. Specifically, we provides [brainpy.analysis.PhasePlane1D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.PhasePlane1D.rst) and [brainpy.analysis.PhasePlane2D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.PhasePlane2D.rst). It can help to plot:\n",
"Phase plane analysis is one of the most important techniques for studying the behavior of nonlinear systems, since there is usually no analytical solution for a nonlinear system. BrainPy can help users to plot phase plane of 1D systems or 2D systems. Specifically, we provide [brainpy.analysis.PhasePlane1D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.PhasePlane1D.rst) and [brainpy.analysis.PhasePlane2D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.PhasePlane2D.rst). It can help to plot:\n",
"\n",
"- **Nullcline**: The zero-growth isoclines, such as $g(x, y)=0$ and $g(x, y)=0$.\n",
"- **Fixed points**: The equilibrium points of the system, which are located at all of the nullclines intersect.\n",
"- **Fixed points**: The equilibrium points of the system, which are located at all the nullclines intersect.\n",
"- **Vector field**: The vector field of the system.\n",
"- **Limit cycles**: The limit cycles.\n",
"- **Trajectories**: A simulation trajectory with the given initial values."
Expand Down Expand Up @@ -710,7 +710,7 @@
"It is highly recommended that users specify the resolution to specific parameters or variables by a dict rather than set a float value, which will be applied to all variables. Otherwise, the computation will occupy too much memory if the resolution is set very small. For example, if you want to set the resolution of variable `x` as 0.01, please use `resolutions={'x': 0.01}`.\n",
"```\n",
"\n",
"Enabling set ``resolutions`` with a tensor will give the user the maximal flexibility. Usually, the numerical alalysis does not work well at inflection points. Therefore, we can increase the granularity near the inflection points. For example, if there is an inflextion point at $1$, we can set the resolution with:"
"Enabling set ``resolutions`` with a tensor will give the user the maximal flexibility. Usually, the numerical analysis does not work well at inflection points. Therefore, we can increase the granularity near the inflection points. For example, if there is an inflection point at $1$, we can set the resolution with:"
]
},
{
Expand Down Expand Up @@ -825,7 +825,7 @@
}
},
"source": [
"We will first see the codimension 1 bifurcation anlysis of the model. For example, we vary the input $I_{ext}$ between 0 to 1 and see how the system change it's stability."
"We will first see the codimension 1 bifurcation analysis of the model. For example, we vary the input $I_{ext}$ between 0 and 1 and see how the system change its stability."
]
},
{
Expand Down Expand Up @@ -996,7 +996,7 @@
"BrainPy also provides a tool for fast-slow system bifurcation analysis by using [brainpy.analysis.FastSlow1D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.FastSlow1D.rst) and [brainpy.analysis.FastSlow2D](../apis/auto/analysis/generated/brainpy.analysis.lowdim.FastSlow2D.rst). This method is proposed by John Rinzel [1, 2, 3]. (J Rinzel, 1985, 1986, 1987) proposed that in a fast-slow dynamical system, we can treat the slow variables as the bifurcation parameters, and then study how the different value of slow variables affect the bifurcation of the fast sub-system.\n",
"\n",
"\n",
"Fast-slow bifurcation methods are very usefull in the bursting neuron analysis. I will illustrate this by using the Hindmarsh-Rose model. The Hindmarsh–Rose model of neuronal activity is aimed to study the spiking-bursting behavior of the membrane potential observed in experiments made with a single neuron. Its dynamics are governed by:\n",
"Fast-slow bifurcation methods are very useful in the bursting neuron analysis. I will illustrate this by using the Hindmarsh-Rose model. The Hindmarsh–Rose model of neuronal activity is aimed to study the spiking-bursting behavior of the membrane potential observed in experiments made with a single neuron. Its dynamics are governed by:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
Expand All @@ -1015,7 +1015,7 @@
}
},
"source": [
"First of all, let's define the Hindmarsh–Rose model with BrainPy. "
"First, let's define the Hindmarsh–Rose model with BrainPy."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial_building/build_network_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
},
"source": [
"The E-I balanced network was first proposed to explain the irregular firing patterns of cortical neurons and comfirmed by experimental data. The network [1] we are going to implement consists of excitatory (E) neurons and inhibitory (I) neurons, the ratio of which is about 4 : 1. The biggest difference between excitatory and inhibitory neurons is the reversal potential - the reversal potential of inhibitory neurons is much lower than that of excitatory neurons. Besides, the membrane time constant of inhibitory neurons is longer than that of excitatory neurons, which indicates that inhibitory neurons have slower dynamics."
"The E-I balanced network was first proposed to explain the irregular firing patterns of cortical neurons and confirmed by experimental data. The network [1] we are going to implement consists of excitatory (E) neurons and inhibitory (I) neurons, the ratio of which is about 4 : 1. The biggest difference between excitatory and inhibitory neurons is the reversal potential - the reversal potential of inhibitory neurons is much lower than that of excitatory neurons. Besides, the membrane time constant of inhibitory neurons is longer than that of excitatory neurons, which indicates that inhibitory neurons have slower dynamics."
]
},
{
Expand Down Expand Up @@ -395,7 +395,7 @@
}
},
"source": [
"All elements are passed as ``**kwargs`` argument can be accessed by the provided keys. This will affect the following dynamics simualtion and will be discussed in greater detail in tutorial of [Runners](../tutorial_toolbox/runners.ipynb)."
"All elements are passed as ``**kwargs`` argument can be accessed by the provided keys. This will affect the following dynamics simulation and will be discussed in greater detail in tutorial of [Runners](../tutorial_toolbox/runners.ipynb)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial_building/build_synapse_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"cell_type": "markdown",
"source": [
"In BrainPy, synapse models can be created by several ways. In this section, we will talk about a structural building process with ``brainpy.dyn.TwoEndConn``. ``brainpy.dyn.TwoEndConn`` is used to create models with pre- and post-synaptic neuron groups.\n",
"In BrainPy, synapse models can be created by several ways. In this section, we will talk about a structural building process with ``brainpy.dyn.TwoEndConn``, which is used to create models with pre- and post-synaptic neuron groups.\n",
"A synapse model is decomposed into several components in ``brainpy.dyn.TwoEndConn``. In such a way, building a synapse model can follow a modular and composable programming interface.\n",
"Fore more details of defining a general synapse model, please refer to ``brainpy.dyn.SynConn`` in [Tutorial: Customizing Synapse Models](./customize_synapse_models.ipynb)."
],
Expand Down Expand Up @@ -132,7 +132,7 @@
"I_{\\mathrm{post}}(t) = g_{\\mathrm{max}} * g * (V_{\\mathrm{post}}(t)-E),\n",
"$$\n",
"\n",
"where its $f_{\\mathrm{dyn}}$ is defined as equation (1), its $f_{\\mathrm{LTP}}$ and $f_{\\mathrm{STP}}$ is the identy function $x = f(x)$, $f_{\\mathrm{out}}$ is defined as a conductance-based form with $(V(t)-E_{\\mathrm{post}})$.\n",
"where its $f_{\\mathrm{dyn}}$ is defined as equation (1), its $f_{\\mathrm{LTP}}$ and $f_{\\mathrm{STP}}$ is the identity function $x = f(x)$, $f_{\\mathrm{out}}$ is defined as a conductance-based form with $(V_{\\mathrm{post}}(t)-E)$.\n",
"\n"
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial_building/customize_dynamical_systems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"source": [
"The previous sections have shown how to build neuron models, synapse models, and network models. In fact, these brain objects all inherit the base class [brainpy.dyn.DynamicalSystem](../apis/auto/dyn/generated/brainpy.dyn.base.DynamicalSystem.rst), ``brainpy.dyn.DynamicalSystem`` is the universal language to define dynamical models in BrainPy.\n",
"\n",
"To begin with, let's make a rief summary of previous dynamic models and give the definition of a dynamical system."
"To begin with, let's make a brief summary of previous dynamic models and give the definition of a dynamical system."
]
},
{
Expand Down
Loading