This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##A collection of functions for the generation of | |
##neural networks and the setup of various experiments. | |
##by Alexandros Kourkoulas-Chondrorizos | |
##v0.1 | |
from scipy import * | |
from scipy.signal import * | |
from matplotlib.pyplot import * | |
from matplotlib.mlab import * | |
import scipy.cluster.hierarchy as sch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy import * | |
from matplotlib.pyplot import * | |
##A pendulum simulation using fourth order | |
##Runge-Kutta integration | |
##v0.1 | |
##Alexandros Kourkoulas Chondrorizos | |
ts=.05 #time step size | |
td=40 #trial duration | |
te=int(td/ts) #no of timesteps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.integrate import * | |
from scipy import * | |
from matplotlib.pyplot import * | |
##A pendulum simulation | |
##v0.2 | |
##Alexandros Kourkoulas Chondrorizos | |
th=pi/4#((rand()*2)-1)*pi #initial angle | |
om=0 #initial angular velocity | |
u=0 #torque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Visualising the structural and functional connectivity | |
##of a neural network. | |
##by Alexandros Kourkoulas-Chondrorizos | |
##v0.1 | |
##This is a simple function that calculates the covariance | |
##matrix of a neural network based on its activity. It then | |
##reorders the covariance matrix to obtain a depiction of | |
##functional connectivity and based on that reordering also | |
##rearranges the connectivity matrix in order to obtain a | |
##clearer picture of its structural connectivity. Put simply, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##A simple genetic algorithm | |
##by Alexandros Kourkoulas-Chondrorizos | |
##v0.1 | |
##This is one of the simplest versions of a GA out there. | |
##You can use it to set up any kind of evolutionary experiment | |
##and it's a great starting point for designing more complex | |
##and sophisticated GAs. Note that the function eval_ind() that | |
##is called in the code below isn't a real function. It's only | |
##a placeholder for whatever your fitness function happens to be. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##A simple function for stimulus estimation/reconstruction | |
##in a neural system using a Wiener-Kolmogorov filter | |
##by Alexandros Kourkoulas-Chondorizos | |
##v0.3 | |
##This function takes two 1-by-N arrays as input, the input | |
##signal presented to the neuron or neural net and the neural | |
##response. It also takes two integers nfft and tstep, where | |
##nfft is the number of data points used in each block for the | |
##FFT and tstep is the sampling frequency. nfft must be even | |
##and a power of 2 is most efficient. tstep is an integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##A generic network connectivity architecture | |
##by Alexandros Kourkoulas-Chondrorizos | |
##v0.2 | |
##This is a simple function that generates a variety | |
##of network connectivities and consequently architectures | |
##anywhere from a three-layer feedforward network | |
##to a neural pool of dynamics. It supports recurrent | |
##connections, lateral and self-connections, feedforward | |
##connections (obviously), any degree of sparsity (0 to | |
##100% connectivity) and both excitatory and inhibitory connections. |