Simulation & Machine Learning
Interactive Hodgkin-Huxley Lab
The Basics
- Action Potential: The electrical "spike" when a neuron fires.
- Depolarisation: Voltage rises sharply. Think of this as the "gas pedal".
- Hyperpolarisation: Voltage drops below rest. Think of this as the "brake".
The Chemistry
- Sodium (Na+): Positive charge flowing in causes the spike (Depolarisation).
- Potassium (K+): Positive charge flowing out resets the cell (Hyperpolarisation).
- Resting memberane potential: -65 mV.
- Hodgkin & Huxley (1952): A quantitative description of membrane current and its application to conduction and excitation in nerve.
Quick Presets
Stimulation
Sodium (Na+)
Potassium (K+)
Get the Python source code here:
View Hodgkin Huxley Simulation Code on GitHubMcCulloch–Pitts Neuron (Binary threshold model)
What it is
- Inputs: binary (0/1), like spikes present vs absent.
- Weights: scale each input (excitatory if positive, inhibitory if negative).
- Bias: a constant offset that shifts firing up/down.
- Threshold (θ): fires if the weighted sum reaches it.
- Output: binary (0/1), a simplified “fires / does not fire”.
Why you should care
- This is the clean ancestor of the perceptron and modern neural nets.
- It shows how logic gates (AND / OR / NOT / NAND) can be implemented with a single unit.
- Important limitation: XOR cannot be done with a single unit; you need multiple layers.
- McCulloch & Pitts (1943): A logical calculus of the ideas immanent in nervous activity.
Inputs
Weights + Threshold
Logic presets
Output
y = 0
x1, x2 are inputs (0 = off, 1 = on).
w1, w2 are weights (positive excites, negative inhibits).
s = w1·x1 + w2·x2 + bias, and the neuron fires if s ≥ θ.
Action Potentials Simulation
Checkout the Action Potentials Simulation on GitHub:
View the GitHub RepositoryE-Field Simulation
Explore the Electric Field Simulation on GitHub:
View the GitHub RepositoryPropofol and MEPs ML Model
Explore the Machine Learning Algorithm to Predict Whether Handedness and Propofol Dosage have any effects on MEP amplitudes on GitHub:
View the GitHub Repository