# Sample Code

Movie of simulated fluorencence activities of cultured neuron

(generated with Matlab)

**Matlab: **We provide Matlab sample code to:

- read the data,

- prepare a sample submission,

- visualize data,

- compute the GTE coefficient and a few other causal direction coefficients,

- train and test a predictor based on such coefficients.

** **The Matlab sample code is suitable to get started. We provide a script (**challengeFastBaseline**) that computes a solution to the challenge (big "valid" and "test" datasets) in a few minutes, on a regular laptop computer. This uses Pearson's correlation coefficient (Correlation benchmark, AUC=0.87322 on the public leaderboard). The data are first discretized with a simple method. Using more elaborate discretization methods such as OOPSI may work better.

The other network reconstruction methods, including GTE, are not optimized: they are slow and requires a lot of memory. Your challenge to do better!

**C++: **Network-reconstruction.org** **provides C++ code, helping you to:

- read the data,

- prepare a sample submission,

- compute the GTE coefficient and a few other causal direction coefficients.

- Note: The fluorescence matrices for small networks have dimension 179498 x 100 and of large networks 179500 x 1000.

Even though the GTE code is "optimized" it is still slow and requires 10-12h of computation for the big 1000 neuron networks on a compute cluster. Your challenge to do better!

**Python:**

We are providing scripts that:

- read the data

- discretizes

- prepare a sample submission using correlation.

One participant also made Python code available.

**Other: **See also the Typical Methods page for other resources.

## Algorithms

The table below gives the definition of the coefficients implemented. Note that these coefficients take into account only statistics of pairs of variables (neurons). Confounding effects are difficult to disambiguate without taking into account other variables/neurons. However, for computational reasons, higher order statistics are difficult to compute.

** Coefficient**

(x -> y

or x <- y)

(x -> y or

x Granger causes y)

x->y

x->y

** Description**

A comparison of these algorithms is found in:

## Visualization

Here are a few illustrations of visualizations the Matlab code can do:

Top: A segment of the time series of fluorescence activities of two neuron (vertically offset).

Bottom: Discretized activities.

A segment of time series of fluorescence activities of all neurons (slightly vertically offset) for a network of 100 neurons.

The average of all time series for a network of 100 neurons.

The matrix of network connections for a network of 100 neurons.

We also provide code to export the networks in the GEXF format for visualization with the Gephi software.

A data browser helps you explore the data.

## Disclaimer

ALL INFORMATION, SOFTWARE, DOCUMENTATION, AND DATA ARE PROVIDED "AS-IS". CHALEARN, KAGGLE AND/OR OTHER ORGANIZERS DISCLAIM ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY OF NON-INFRIGEMENT OF ANY THIRD PARTY'S INTELLECTUAL PROPERTY RIGHTS. IN NO EVENT SHALL THE ORGANIZERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF SOFTWARE, DOCUMENTS, MATERIALS, PUBLICATIONS, OR INFORMATION MADE AVAILABLE FOR THE CHALLENGE.