<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Archiving and Interchange DTD v2.3 20070202//EN" "archivearticle.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="methods-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Comput. Neurosci.</journal-id>
<journal-title>Frontiers in Computational Neuroscience</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Comput. Neurosci.</abbrev-journal-title>
<issn pub-type="epub">1662-5188</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fncom.2016.00140</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Neuroscience</subject>
<subj-group>
<subject>Methods</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Computational Approach to Dendritic Spine Taxonomy and Shape Transition Analysis</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Bokota</surname> <given-names>Grzegorz</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="author-notes" rid="fn002"><sup>&#x02020;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/369013/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Magnowska</surname> <given-names>Marta</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="author-notes" rid="fn002"><sup>&#x02020;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/358255/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Ku&#x0015B;mierczyk</surname> <given-names>Tomasz</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="author-notes" rid="fn002"><sup>&#x02020;</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>&#x00141;ukasik</surname> <given-names>Micha&#x00142;</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Roszkowska</surname> <given-names>Matylda</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/399432/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Plewczynski</surname> <given-names>Dariusz</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff5"><sup>5</sup></xref>
<xref ref-type="author-notes" rid="fn001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/347568/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Centre of New Technologies, University of Warsaw</institution> <country>Warsaw, Poland</country></aff>
<aff id="aff2"><sup>2</sup><institution>Nencki Institute of Experimental Biology, Polish Academy of Sciences</institution> <country>Warsaw, Poland</country></aff>
<aff id="aff3"><sup>3</sup><institution>Department of Computer and Information Science, Norwegian University of Science and Technology</institution> <country>Trondheim, Norway</country></aff>
<aff id="aff4"><sup>4</sup><institution>Department of Computer Science, University of Sheffield</institution> <country>Sheffield, UK</country></aff>
<aff id="aff5"><sup>5</sup><institution>Faculty of Pharmacy, Medical University of Warsaw</institution> <country>Warsaw, Poland</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Concha Bielza, Technical University of Madrid, Spain</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Florentin W&#x000F6;rg&#x000F6;tter, University of G&#x000F6;ttingen, Germany; Ran Su, Tianjin University, Chile</p></fn>
<fn fn-type="corresp" id="fn001"><p>&#x0002A;Correspondence: Dariusz Plewczynski <email>d.plewczynski&#x00040;cent.uw.edu.pl</email></p></fn>
<fn fn-type="other" id="fn002"><p>&#x02020;shared first authorship.</p></fn></author-notes>
<pub-date pub-type="epub">
<day>23</day>
<month>12</month>
<year>2016</year>
</pub-date>
<pub-date pub-type="collection">
<year>2016</year>
</pub-date>
<volume>10</volume>
<elocation-id>140</elocation-id>
<history>
<date date-type="received">
<day>06</day>
<month>05</month>
<year>2016</year>
</date>
<date date-type="accepted">
<day>05</day>
<month>12</month>
<year>2016</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2016 Bokota, Magnowska, Ku&#x0015B;mierczyk, &#x00141;ukasik, Roszkowska and Plewczynski.</copyright-statement>
<copyright-year>2016</copyright-year>
<copyright-holder>Bokota, Magnowska, Ku&#x0015B;mierczyk, &#x00141;ukasik, Roszkowska and Plewczynski</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><p>The common approach in morphological analysis of dendritic spines of mammalian neuronal cells is to categorize spines into subpopulations based on whether they are stubby, mushroom, thin, or filopodia shaped. The corresponding cellular models of synaptic plasticity, long-term potentiation, and long-term depression associate the synaptic strength with either spine enlargement or spine shrinkage. Although a variety of automatic spine segmentation and feature extraction methods were developed recently, no approaches allowing for an automatic and unbiased distinction between dendritic spine subpopulations and detailed computational models of spine behavior exist. We propose an automatic and statistically based method for the unsupervised construction of spine shape taxonomy based on arbitrary features. The taxonomy is then utilized in the newly introduced computational model of behavior, which relies on transitions between shapes. Models of different populations are compared using supplied bootstrap-based statistical tests. We compared two populations of spines at two time points. The first population was stimulated with long-term potentiation, and the other in the resting state was used as a control. The comparison of shape transition characteristics allowed us to identify the differences between population behaviors. Although some extreme changes were observed in the stimulated population, statistically significant differences were found only when whole models were compared. The source code of our software is freely available for non-commercial use<xref ref-type="fn" rid="fn0001"><sup>1</sup></xref>. Contact: <email>d.plewczynski&#x00040;cent.uw.edu.pl</email>.</p></abstract>
<kwd-group>
<kwd>dendritic spines</kwd>
<kwd>shape transitions</kwd>
<kwd>synaptic plasticity</kwd>
<kwd>image processing</kwd>
</kwd-group>
<contract-num rid="cn001">2014/15/B/ST6/05082</contract-num>
<contract-num rid="cn001">2013/09/B/NZ2/00121</contract-num>
<contract-num rid="cn001">N N301 665140</contract-num>
<contract-num rid="cn001">UMO-2015/17/B/NZ3/00557</contract-num>
<contract-num rid="cn002">POKL.04.01.01-00-051/10-00</contract-num>
<contract-sponsor id="cn001">Narodowe Centrum Nauki<named-content content-type="fundref-id">10.13039/501100004281</named-content></contract-sponsor>
<contract-sponsor id="cn002">Information technologies: research and their interdisciplinary applications</contract-sponsor>
<counts>
<fig-count count="4"/>
<table-count count="4"/>
<equation-count count="7"/>
<ref-count count="39"/>
<page-count count="11"/>
<word-count count="8256"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>1. Introduction</title>
<p>Brain plasticity depends on the functional and structural reorganization of the synapses. The majority of the excitatory synapses are located on dendritic spines, which are small membranous protrusions localized on the surface of neuronal dendrites. The important feature of dendritic spines is their structural variability, which ranges from long, filopodia spines to short stubby and mushroom-shaped spines. Dendritic spines are typically composed of a head that is connected to the dendrite by a neck. The size of the spine head is proportional to the postsynaptic density area and correlates with the postsynaptic receptor content and synaptic strength (Nusser et al., <xref ref-type="bibr" rid="B25">1998</xref>; Kharazia and Weinberg, <xref ref-type="bibr" rid="B13">1999</xref>; Takumi et al., <xref ref-type="bibr" rid="B34">1999</xref>). The length of the dendritic spine neck is correlated with the postsynaptic potential (Araya et al., <xref ref-type="bibr" rid="B1">2006</xref>; T&#x000F8;nnesen et al., <xref ref-type="bibr" rid="B36">2014</xref>). Thus, the dendritic spine shape has been accepted for determining the strength of the synaptic connections and is thought to underlie the processes of information coding and memory storage in the brain. Furthermore, alterations in dendritic spine shape, size, and density are associated with a number of brain disorders (DeKosky and Scheff, <xref ref-type="bibr" rid="B4">1990</xref>; Irwin et al., <xref ref-type="bibr" rid="B9">2001</xref>; Selemon et al., <xref ref-type="bibr" rid="B29">2006</xref>; Knobloch and Mansuy, <xref ref-type="bibr" rid="B14">2008</xref>; Sweet et al., <xref ref-type="bibr" rid="B32">2008</xref>; Hutsler and Zhang, <xref ref-type="bibr" rid="B8">2010</xref>; Penzes et al., <xref ref-type="bibr" rid="B26">2011</xref>; Levenga and Willemsen, <xref ref-type="bibr" rid="B15">2012</xref>).</p>
<p>The morphology of spines can change in an activity-dependent manner. The structural plasticity of dendritic spines is related to synaptic function, as the morphological modifications of pre-existing spines as well as the formation or loss of synapses accompany the learning and memory processes (Xu et al., <xref ref-type="bibr" rid="B37">2009</xref>; Yang et al., <xref ref-type="bibr" rid="B38">2009</xref>; for reviews see Holtmaat and Svoboda, <xref ref-type="bibr" rid="B7">2009</xref>; Caroni et al., <xref ref-type="bibr" rid="B3">2012</xref>). The cellular models of synaptic plasticity, <italic>long-term potentiation</italic> (LTP) and <italic>long-term depression</italic> (LTD) associate the synaptic strength with spine enlargement and spine shrinkage, respectively (Yuste and Bonhoeffer, <xref ref-type="bibr" rid="B39">2001</xref>; Holtmaat and Svoboda, <xref ref-type="bibr" rid="B7">2009</xref>; Kasai et al., <xref ref-type="bibr" rid="B11">2010</xref>).</p>
<p>Understanding dendritic spine shape taxonomy and shape transitions upon synaptic potentiation is of great importance. The common approach in analysis of dendritic spine morphological changes is to categorize the spines into subpopulations based on whether they are stubby, mushroom, thin, or filopodia shaped (Su et al., <xref ref-type="bibr" rid="B31">2014</xref>). Of importance, the existing categorization of dendritic spine shapes (Su et al., <xref ref-type="bibr" rid="B31">2014</xref>) does not provide a clear definition of each group. Moreover, the literature lacks methods allowing an automated assigment between dendritic spine shapes. Additionally, a recent report suggests the existence of dendritic spine shapes continuum rather than specific spine subclasses (Loewenstein et al., <xref ref-type="bibr" rid="B17">2015</xref>). Thus, the existing classifications have to be revisited and a new automatic classification method with clear mathematical rules should be derived. To address this issue, we employed a new methodological approach with potential applicability in the studies of dendritic spine shape taxonomy and transitions in time. Our clustering-based approach permits analysis of dendritic spine dynamics in multi-dimensional feature space by reducing the complexity subpopulations. To test this method, similarly to previous works, we potentiated the synapses with cLTP stimulation that produces a long-lasting increase in network activity and mimics several aspects of LTP, including synaptic receptor incorporation to the dendritic spine membrane. The morphology of single dendritic spines was assessed using time-lapse imaging of living neurons. In the rest of the paper, we refer to a population of spines stimulated by cLTP as <italic>ACTIVE</italic>, and the non-treated spines are denoted as <italic>CONTROL</italic>.</p>
<p>The paper is organized as follows. In Section 2, we describe the process of data gathering and data representation and the statistical approach to analysis of spine shapes. First, we analyze the basic characteristics of features in the populations named <italic>ACTIVE</italic> and <italic>CONTROL</italic> and conclude that before a meaningful comparison can be performed, the populations need to be normalized. In Section 3, we develop a simple but meaningful numerical representations of spines and we provide an approach to dendritic spine taxonomy construction and models of shape transitions together with statistical tests for model comparisons. For taxonomy development, we propose a clustering-based approach that does not depend on subjective decisions of experts and can accommodate arbitrary numerical features. Later, we introduce a corresponding probabilistic model of spine transitions between the clusters in time. We also propose a bootstrap-based approach and two statistical tests that are applied for the purpose of the comparison of models built for different populations of spines. Finally, in Section 4, we present an example of method application. We summarize our work in Section 5.</p>
</sec>
<sec id="s2">
<title>2. Data preparation and analysis</title>
<p>In this section, we describe the statistical analyses of mammalian dendritic cell populations <italic>ACTIVE</italic> and <italic>CONTROL</italic>. A comparison of the descriptor distributions showed that an initial data preprocessing was necessary, which we performed by carefully choosing subsets of the spines from both populations<xref ref-type="fn" rid="fn0002"><sup>2</sup></xref>. Finally, we introduce the algorithm for spine representation dimensionality reduction.</p>
<sec>
<title>2.1. Data acquisition</title>
<p>Dissociated hippocampal cultures were prepared as described previously in Nunez (<xref ref-type="bibr" rid="B24">2008</xref>). On the 10th day, <italic>in vitro</italic> cells were transfected using Effectene (Qiagen) according to the manufacturer&#x00027;s protocol with a plasmid carrying red fluorescence protein under &#x003B2;-actin promoter. All the experiments were performed over the course of 19&#x02013;21 days <italic>in vitro</italic>. During the imaging session, the cells were kept in an acquisition chamber with controlled temperature (37&#x000B0;C) and stable CO<sub>2</sub> (5%) concentration. Chosen dendritic segments decorated with dendritic spines were imaged at the two time points: at the time 0 (before the stimulation) and 10 min after the stimulation. In the ACTIVE group the chemical LTP (cLTP) was induced by bath application of a mixture of 50 &#x003BC;M forskolin, 50 &#x003BC;M picrotoxin and 0.1 &#x003BC;M rolipram (each dissolved in DMSO) in maintenance media. The CONTROL group received compound-free solvent (DMSO). Of note, the implemented way of stimulation (cLTP) mimics several LTP aspects such as enhanced network activity of the hippocampal neurons (Niedringhaus et al., <xref ref-type="bibr" rid="B18">2012</xref>), delivery of the extrasynaptic AMPA-receptors (Oh et al., <xref ref-type="bibr" rid="B20">2006</xref>), and changes in the dendritic spine structure (Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>).</p>
<p>Image acquisition was performed using the Leica TCS SP 5 confocal microscope with a PL Apo 40 &#x000D7; /1.25 NA oil immersion objective using a 561 <italic>nm</italic> line of diode pumped solid state laser with 10% transmission and collected date with a pixel size of 1024 &#x000D7; 1024. Captured cell images consisted of series of z-stacks taken at every 0.4&#x003BC;<italic>m</italic> step. On average, around 14&#x02013;17 slices (depending on specimen thickness) were taken per stack. The final sampling density was 0.07&#x003BC;<italic>m</italic> per pixel.</p>
<p>The resolution of the confocal microscope along the optical axis (z axis) is three time worse than the resolution along the lateral direction. The majority of observed dendritic spines arise in the lateral direction. Thus, due to limitations of confocal microscopy, it is almost impossible to determine the three-dimensional dendritic spine features. The spines that could be easily distinguished and that protruded in the transverse direction were chosen for analysis. Because of the synaptic scaling, dendritic spine structure and density are modulated with respect to the position along the dendritic tree (Menon et al., <xref ref-type="bibr" rid="B21">2013</xref>). To avoid this issue and following the approach by Michaluk et al. (<xref ref-type="bibr" rid="B22">2011</xref>), we chose spines that belonged to the secondary dendrites.</p>
<p>The next step of data preparation was to obtain the numerical features of the spines. Although many spine extraction methods exist (Fanti et al., <xref ref-type="bibr" rid="B6">2011</xref>; Schmitz et al., <xref ref-type="bibr" rid="B28">2011</xref>; Li and Deng, <xref ref-type="bibr" rid="B16">2012</xref>), the methods do not prove to be useful in our approach. Therefore, we analyzed the images semi-automatically using custom written software (Ruszczycki et al., <xref ref-type="bibr" rid="B27">2012</xref>). The recorded dendritic spine features (denoted as <italic>DESCRIPTORS</italic>) were length, head width (denote hw), max width location (denote mwl), max width (denote mw), neck width (denote nw), foot, circumference, area, width to length ratio (denote wlr), length to width ratio (denote lwr), and length to area ratio (denote lar). Since in this paper we focus on the two dimensional data, the direct dendritic spine volume analysis is not possible. However, the volume can be estimated based on the area. Moreover, the method <italic>per se</italic> can be used to analyze the three dimensional data. Although researches have not found a consensus yet on which features should be considered, this set covers parameters that are the most often used (Michaluk et al., <xref ref-type="bibr" rid="B22">2011</xref>; Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>; T&#x000F8;nnesen et al., <xref ref-type="bibr" rid="B36">2014</xref>). The spine length was determined by measuring the curvilinear length along the virtual skeleton of the spine, which was obtained by fitting the curve (using fourth-degree polynomial). The fitting procedure involved searching for a curve along which the integrated fluorescence was at a maximum level. Many spines were distinctly bent such that the distance along a straight line between the tip and the base of the spine underestimates the length of the spine. To define the head width, we used the diameter of the largest spine section that was perpendicular to the virtual skeleton, while the bottom part of the spine (third of the spine length adjacent to the dendrite) was excluded. To define the neck width, we used the thinnest part of the spine between the position of the head-width measurement and the point at which the spine is anchored into the dendrite. The details can be found at work done by Ruszczycki et al. (<xref ref-type="bibr" rid="B27">2012</xref>).</p>
<p>We ended up with two groups of spines, the stimulated <italic>ACTIVE</italic> type consisting of 433 samples and the control <italic>CONTROL</italic> type consisting of 490 samples. For each spine, all of the above 11 features were measured at two different timestamps: <italic>t</italic><sub>0</sub> (the time before stimulation) and <italic>t</italic><sub>1</sub> (10 min after <italic>t</italic><sub>0</sub>). It has been shown that that after 10 min (Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>), modifications in the spine structure could already be observed and demonstrated that stimulation causes the cleavage of important adhesion molecules at the dendritic spines (Stawarski et al., <xref ref-type="bibr" rid="B30">2014</xref>). Consequently, by <italic>ACTIVE</italic> (<italic>CONTROL</italic>), we denote all features at all timestamps and, by <italic>ACTIVE</italic><sup><italic>x</italic></sup>, we denote all spines from the <italic>ACTIVE</italic> data set described only by features at time <italic>t</italic><sub><italic>x</italic></sub> (similarly, <italic>CONTROL</italic><sup><italic>x</italic></sup>).</p>
</sec>
<sec>
<title>2.2. Balanced subset selection</title>
<p>In Table <xref ref-type="table" rid="T1">1</xref>, we report the mean values for descriptors from <italic>ACTIVE</italic><sup>0</sup> and <italic>CONTROL</italic><sup>0</sup> populations. We report <italic>p</italic>-values from two-tailed <italic>t</italic>-tests<xref ref-type="fn" rid="fn0003"><sup>3</sup></xref> for the difference of means between both sets. We report significant differences for almost all descriptors (only for three features is the <italic>p</italic>-value above the threshold value <italic>p</italic>&#x0003E;0.001).</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p><bold>Differences between <italic><bold>ACTIVE</bold></italic> and <italic><bold>CONTROL</bold></italic> at time <italic><bold>t</bold></italic><sub><bold>0</bold></sub></bold>.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Feature</bold></th>
<th valign="top" align="center" colspan="2" style="border-bottom: thin solid #000000;"><italic><bold><italic><bold>ACTIVE</bold></italic></bold></italic><sup><bold>0</bold></sup></th>
<th valign="top" align="center" colspan="2" style="border-bottom: thin solid #000000;"><italic><bold><italic><bold>CONTROL</bold></italic></bold></italic><sup><bold>0</bold></sup></th>
<th valign="top" align="center"><bold><italic>p</italic>-value</bold></th>
</tr>
<tr>
<th/>
<th valign="top" align="center"><bold>Mean</bold></th>
<th valign="top" align="center"><bold>Std</bold></th>
<th valign="top" align="center"><bold>Mean</bold></th>
<th valign="top" align="center"><bold>Std</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Length</td>
<td valign="top" align="center">1.268</td>
<td valign="top" align="center">0.470</td>
<td valign="top" align="center">1.539</td>
<td valign="top" align="center">0.714</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Head width</td>
<td valign="top" align="center">0.685</td>
<td valign="top" align="center">0.098</td>
<td valign="top" align="center">0.808</td>
<td valign="top" align="center">0.092</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Max width location</td>
<td valign="top" align="center">0.554</td>
<td valign="top" align="center">0.083</td>
<td valign="top" align="center">0.608</td>
<td valign="top" align="center">0.073</td>
<td valign="top" align="center">0.003</td>
</tr>
<tr>
<td valign="top" align="left">Max width</td>
<td valign="top" align="center">0.792</td>
<td valign="top" align="center">0.134</td>
<td valign="top" align="center">0.958</td>
<td valign="top" align="center">0.108</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Width length ratio</td>
<td valign="top" align="center">0.667</td>
<td valign="top" align="center">0.168</td>
<td valign="top" align="center">0.657</td>
<td valign="top" align="center">0.142</td>
<td valign="top" align="center">0.721</td>
</tr>
<tr>
<td valign="top" align="left">Length width ratio</td>
<td valign="top" align="center">2.161</td>
<td valign="top" align="center">2.391</td>
<td valign="top" align="center">2.223</td>
<td valign="top" align="center">3.390</td>
<td valign="top" align="center">0.577</td>
</tr>
<tr>
<td valign="top" align="left">Neck width</td>
<td valign="top" align="center">0.418</td>
<td valign="top" align="center">0.081</td>
<td valign="top" align="center">0.551</td>
<td valign="top" align="center">0.090</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Foot</td>
<td valign="top" align="center">0.772</td>
<td valign="top" align="center">0.133</td>
<td valign="top" align="center">0.994</td>
<td valign="top" align="center">0.219</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Circumference</td>
<td valign="top" align="center">4.612</td>
<td valign="top" align="center">3.969</td>
<td valign="top" align="center">5.502</td>
<td valign="top" align="center">6.223</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Area</td>
<td valign="top" align="center">0.675</td>
<td valign="top" align="center">0.183</td>
<td valign="top" align="center">0.977</td>
<td valign="top" align="center">0.307</td>
<td valign="top" align="center">0.000</td>
</tr>
<tr>
<td valign="top" align="left">Length area ratio</td>
<td valign="top" align="center">2.158</td>
<td valign="top" align="center">0.966</td>
<td valign="top" align="center">1.726</td>
<td valign="top" align="center">0.597</td>
<td valign="top" align="center">0.000</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>Means and p-values from the two-tailed t-test. Width length ratio and length width ratio are dimensionless, area is in &#x003BC;m<sup>2</sup> and length area ratio is in &#x003BC;m<sup>&#x02212;1</sup>. Other descriptor values are measured in &#x003BC;m. Significant differences are observed between all descriptor values except for two features</italic>.</p>
</table-wrap-foot>
</table-wrap>
<p>Such large differences between both sets may influence the statistical analysis of their behavior. Therefore, we decided to preprocess the datasets by excluding some spines, such that the means in the new sets are similar with respect to the statistical test used. Namely, we drew a number of pairs of closest spines, each pair consisting of a spine from the <italic>ACTIVE</italic> set and a spine from the <italic>CONTROL</italic>. The measure of how close the spines are is based on the normalized Euclidean distance<xref ref-type="fn" rid="fn0004"><sup>4</sup></xref> between the vectors of features at time <italic>t</italic><sub>0</sub>. The pseudo-code for the algorithm is presented in Algorithm <xref ref-type="supplementary-material" rid="SM1">S1</xref> in the Supplementary Material.</p>
<p>Such an approach can be justified by the fact that the two cultures were obtained from different animals (each culture consist of a mix of dissociated hippocampal neurons isolated from one litter of rat pups), thus a systematic differences might appear between <italic>in vitro</italic> cultures. Initially dendritic spines may exhibit a significant structural differences between cultures, yet here we focus on the direction of stimulation-induced structural changes. The implemented standardization allowed us to eliminate the changes unrelated to the treatment and highlight the stimulation-related modifications in dendritic spine structure between the analyzed groups<xref ref-type="fn" rid="fn0005"><sup>5</sup></xref>. One can not exclude a possibility that the change in the dendritic spines may be dependent on their initial morphological features (Kasai et al., <xref ref-type="bibr" rid="B12">2003</xref>; Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>). Thus, the implemented normalization of the dendritic spine shape at the beginning of the analysis should not affect the obtained outcome.</p>
<p>In Table <xref ref-type="table" rid="T2">2</xref>, we report new statistics on the differences between samples after the 300 closest pairs have been drawn<xref ref-type="fn" rid="fn0006"><sup>6</sup></xref>. The same statistical test that was performed before is used here as well. The <italic>p</italic>-values are significantly higher for all features, and no one feature is significantly different in the two compared groups. We are going to further investigate these new &#x0201C;normalized&#x0201D; sets, denoted as <italic>ACTIVE300</italic> (the 300 closest spines drawn from <italic>ACTIVE</italic>) and <italic>CONTROL300</italic> (the 300 closest spines drawn from <italic>CONTROL</italic>).</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p><bold>Differences between <italic><bold>ACTIVE300</bold></italic><sup>0</sup> and <italic><bold>CONTROL300</bold></italic><sup><bold>0</bold></sup> at time <italic><bold>t</bold></italic><sub><bold>0</bold></sub></bold>.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Feature</bold></th>
<th valign="top" align="center" colspan="2" style="border-bottom: thin solid #000000;"><italic><bold><italic><bold>ACTIVE</bold></italic></bold></italic><sup><bold>0</bold></sup></th>
<th valign="top" align="center" colspan="2" style="border-bottom: thin solid #000000;"><italic><bold><italic><bold>CONTROL</bold></italic></bold></italic><sup><bold>0</bold></sup></th>
<th valign="top" align="center"><bold><italic>p</italic>-value</bold></th>
</tr>
<tr>
<th/>
<th valign="top" align="center"><bold>Mean</bold></th>
<th valign="top" align="center"><bold>Std</bold></th>
<th valign="top" align="center"><bold>Mean</bold></th>
<th valign="top" align="center"><bold>Std</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Length</td>
<td valign="top" align="center">1.240</td>
<td valign="top" align="center">0.286</td>
<td valign="top" align="center">1.276</td>
<td valign="top" align="center">0.288</td>
<td valign="top" align="center">0.416</td>
</tr>
<tr>
<td valign="top" align="left">Head width</td>
<td valign="top" align="center">0.736</td>
<td valign="top" align="center">0.070</td>
<td valign="top" align="center">0.743</td>
<td valign="top" align="center">0.064</td>
<td valign="top" align="center">0.762</td>
</tr>
<tr>
<td valign="top" align="left">Max width location</td>
<td valign="top" align="center">0.592</td>
<td valign="top" align="center">0.075</td>
<td valign="top" align="center">0.586</td>
<td valign="top" align="center">0.071</td>
<td valign="top" align="center">0.789</td>
</tr>
<tr>
<td valign="top" align="left">Max width</td>
<td valign="top" align="center">0.844</td>
<td valign="top" align="center">0.076</td>
<td valign="top" align="center">0.845</td>
<td valign="top" align="center">0.062</td>
<td valign="top" align="center">0.977</td>
</tr>
<tr>
<td valign="top" align="left">Width length ratio</td>
<td valign="top" align="center">0.702</td>
<td valign="top" align="center">0.137</td>
<td valign="top" align="center">0.688</td>
<td valign="top" align="center">0.132</td>
<td valign="top" align="center">0.630</td>
</tr>
<tr>
<td valign="top" align="left">Length width ratio</td>
<td valign="top" align="center">1.898</td>
<td valign="top" align="center">1.251</td>
<td valign="top" align="center">1.917</td>
<td valign="top" align="center">1.231</td>
<td valign="top" align="center">0.832</td>
</tr>
<tr>
<td valign="top" align="left">Neck width</td>
<td valign="top" align="center">0.479</td>
<td valign="top" align="center">0.075</td>
<td valign="top" align="center">0.505</td>
<td valign="top" align="center">0.069</td>
<td valign="top" align="center">0.236</td>
</tr>
<tr>
<td valign="top" align="left">Foot</td>
<td valign="top" align="center">0.840</td>
<td valign="top" align="center">0.122</td>
<td valign="top" align="center">0.855</td>
<td valign="top" align="center">0.127</td>
<td valign="top" align="center">0.606</td>
</tr>
<tr>
<td valign="top" align="left">Circumference</td>
<td valign="top" align="center">4.566</td>
<td valign="top" align="center">2.329</td>
<td valign="top" align="center">4.591</td>
<td valign="top" align="center">2.136</td>
<td valign="top" align="center">0.834</td>
</tr>
<tr>
<td valign="top" align="left">Area</td>
<td valign="top" align="center">0.720</td>
<td valign="top" align="center">0.126</td>
<td valign="top" align="center">0.748</td>
<td valign="top" align="center">0.121</td>
<td valign="top" align="center">0.330</td>
</tr>
<tr>
<td valign="top" align="left">Length area ratio</td>
<td valign="top" align="center">1.871</td>
<td valign="top" align="center">0.498</td>
<td valign="top" align="center">1.837</td>
<td valign="top" align="center">0.492</td>
<td valign="top" align="center">0.556</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>Means and p-values from two-tailed t-tests are shown. Width length ratio and length width ratio are dimensionless, area is in &#x003BC;m<sup>2</sup> and length area ratio is in &#x003BC;m<sup>&#x02212;1</sup>. Other descriptor values are measured in &#x003BC;m. No significant differences between any descriptor values are observed for all geometrical features</italic>.</p>
</table-wrap-foot>
</table-wrap>
</sec>
</sec>
<sec sec-type="methods" id="s3">
<title>3. Methods</title>
<p>In this section, we present PCA and apply two clustering methods to construct the spine shape taxonomy in an unsupervised way. Further, we build the probabilistic model of shape changes in time. Finally, the bootstrap analysis is presented to statistically evaluate the differences between both the resting and potentiated populations.</p>
<sec>
<title>3.1. Simplification of shape representations</title>
<p>The Principal Component Analysis (PCA) (for details see Jolliffe, <xref ref-type="bibr" rid="B10">2002</xref>) is used where the reduction of the data dimensionality is required. It has been used in order to provide the most significant information. The PCA method provides orthogonal basis, which is required for Euclidian metrics used for clustering. We applied PCA to spines from both populations <italic>CONTROL</italic> and <italic>ACTIVE</italic> and for both <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub>. For the first two features (components) in the reduced representation, we cover about 91% of the variance in the data (see Figure <xref ref-type="supplementary-material" rid="SM1">S1</xref>). The removal of other features does not reduce the available information by much (only 9% of the variance is lost). The new features are linear combinations of the initial features: <italic>Comp</italic>.1&#x02032; &#x0003D; &#x02212;0.27 &#x000B7; <italic>length</italic> &#x02212; 0.49 &#x000B7; <italic>lwr</italic> &#x02212; 0.81 &#x000B7; <italic>circumference</italic> &#x02212; 0.15 &#x000B7; <italic>area</italic>; <italic>Comp</italic>.2&#x02032; &#x0003D; &#x02212; 0.17 &#x000B7; <italic>hw</italic> &#x02212; 0.17 &#x000B7; <italic>mw</italic> &#x02212; 0.11 &#x000B7; <italic>wlr</italic> &#x0002B; 0.71 &#x000B7; <italic>lwr</italic> &#x02212; 0.12 &#x000B7; <italic>nw</italic> &#x02212; 0.12 &#x000B7; <italic>foot</italic> &#x02212; 0.41 &#x000B7; <italic>circumference</italic> &#x02212; 0.21 &#x000B7; <italic>area</italic> &#x0002B; 0.44 &#x000B7; <italic>lar</italic>. We see that <italic>Comp</italic>.1&#x02032; is composed mostly of features related to size such as length, circumference, and area. Therefore, this feature can be treated as a generalized size descriptor. Similarly, we can interpret <italic>Comp</italic>.2&#x02032; as a generalized contour (shape slenderness) descriptor.</p>
<p>The interpretation of the above components as size and contour descriptors allows us to construct more meaningful features. The initial features can be directly divided into two sets: <italic>DESCRIPTORS</italic><sup><italic>SIZE</italic></sup> &#x0003D;{length, circumference, area} (size related features) and <italic>DESCRIPTORS</italic><sup><italic>CONTOUR</italic></sup> &#x0003D;{hw, foot, mwl, mw, wlr, lwr, lar, nw} (contour related features). Then, PCA is applied separately to each of the sets. Using the first feature from PCA on <italic>DESCRIPTORS</italic><sup><italic>SIZE</italic></sup> and the first feature from PCA on <italic>DESCRIPTORS</italic><sup><italic>CONTOUR</italic></sup>, 87% of the variance is explained (see Figure <xref ref-type="supplementary-material" rid="SM1">S2</xref>). The loss of the variance compared with PCA computed on all features merged together is equal to 4%. However, the new representation (denoted as <italic>DESCRIPTORS</italic><sup><italic>PCA</italic></sup>) is easy to interpret. The new features provide a clear meaning of size and contour slenderness and reduce to a simple form:
<disp-formula id="E8"><mml:math id="M16"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:mtable><mml:mtr><mml:mtd><mml:mrow><mml:mi>C</mml:mi><mml:mi>o</mml:mi><mml:mi>m</mml:mi><mml:mi>p</mml:mi><mml:mn>.1</mml:mn><mml:mo>=</mml:mo><mml:mo>&#x02212;</mml:mo><mml:mn>0.29</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mi>l</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>g</mml:mi><mml:mi>t</mml:mi><mml:mi>h</mml:mi><mml:mo>&#x02212;</mml:mo><mml:mn>0.94</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mi>r</mml:mi><mml:mi>c</mml:mi><mml:mi>u</mml:mi><mml:mi>m</mml:mi><mml:mi>f</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x02212;</mml:mo><mml:mn>0.19</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mtext>&#x02009;</mml:mtext><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mi>C</mml:mi><mml:mi>o</mml:mi><mml:mi>m</mml:mi><mml:mi>p</mml:mi><mml:mn>.2</mml:mn><mml:mo>=</mml:mo><mml:mo>&#x02212;</mml:mo><mml:mn>0.14</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mi>w</mml:mi><mml:mi>l</mml:mi><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:mn>0.94</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mi>l</mml:mi><mml:mi>w</mml:mi><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:mn>0.28</mml:mn><mml:mo>&#x022C5;</mml:mo><mml:mtext>&#x02009;</mml:mtext><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
Comparing the loadings (weights) against previous formulas for <italic>Comp</italic>.1&#x02032; and <italic>Comp</italic>.2&#x02032;, we notice that the differences are small, i.e., below 15% in most cases. The most important feature of the size descriptor is the circumference (the highest loading), and the most important feature of the contour descriptor is lwr. Most of the initial features, i.e., hw, foot, mwl, mw, and nw, are not included (We used the Principal Component Analysis function (<italic>princomp</italic>) which is implemented in programming language <italic>R</italic>. Feature weights smaller than 10% were neglected.</p>
<p>Spine distributions in the new feature space <italic>Comp</italic>.1 &#x000D7; <italic>Comp</italic>.2 are shown in Figure <xref ref-type="fig" rid="F1">1</xref>. The whole space of features was partitioned into tiles of size 4 &#x000D7; 4, and for each tile, one representative spine (the closest to the tile center) was chosen. We can see how the spine size changes along <italic>Comp</italic>.1 from the smallest on the right side to the biggest one on the left side. Similarly, spine slenderness change along <italic>Comp</italic>.2, from the thinnest on the top to the thickest on the bottom.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p><bold>Distribution of spine shapes in space composed of the features <italic><bold>Comp</bold></italic>.1 and <italic><bold>Comp</bold></italic>.2</bold>. <italic>Comp</italic>.1 is a generalized size descriptor, and <italic>Comp</italic>.2 is a generalized spine slenderness. Spine sizes change along <italic>Comp</italic>.1 from the smallest on the right side to the biggest on the left side. The spine contour slenderness changes along <italic>Comp</italic>.2 from the thinnest on the top to the thickest on the bottom.</p></caption>
<graphic xlink:href="fncom-10-00140-g0001.tif"/>
</fig>
</sec>
<sec>
<title>3.2. Clusters of shapes</title>
<p>Initially, the spines are represented in some arbitrary multidimensional space of features, e.g., <italic>DESCRIPTORS</italic><sup><italic>PCA</italic></sup>. Our goal is to obtain a high-level representation that would be both meaningful and simple. Therefore, we propose to apply clustering. Clustering allows for assigning similar objects in terms of their geometrical properties (for example, spines) to groups; i.e., subsets that we call clusters in our paper. In this study the clusters represent the possible shapes of spines. The underlying idea is that the spines in a cluster have greater similarity shapes (they are more similar in terms of derived features) among themselves than to spines outside the given cluster. We consider two well-established algorithms, <italic>cmeans</italic> (Bezdek, <xref ref-type="bibr" rid="B2">1981</xref>) and average-linkage <italic>hierarchical</italic> (Murtagh, <xref ref-type="bibr" rid="B23">1983</xref>), that represent the two main types of clustering: <italic>crisp</italic> and <italic>fuzzy</italic>.</p>
<p>In clustering, each spine <italic>s</italic> is assigned a vector <italic>w</italic>(<italic>s</italic>) &#x0003D; (<italic>w</italic><sub>1</sub>(<italic>s</italic>), &#x02026;, <italic>w</italic><sub><italic>k</italic></sub>(<italic>s</italic>)) of <italic>k</italic> membership weights that are non-negative and sum up to 1. For example, <italic>w</italic><sub><italic>n</italic></sub>(<italic>s</italic>) is a membership of the spine <italic>s</italic> against the <italic>n</italic>-th cluster. In <italic>crisp</italic> clustering, spines are assigned to exactly one cluster (<italic>w</italic><sub><italic>n</italic></sub>(<italic>s</italic>) &#x0003D; 1 &#x021D4; <italic>s</italic> assigned to n-th cluster; 0 otherwise). In <italic>fuzzy</italic> clustering, weights can be arbitrary real numbers between 0 and 1. Additionally, weights can be interpreted as probabilities, e.g., <italic>w</italic><sub><italic>n</italic></sub>(<italic>s</italic>) can be interpreted as the probability that spine <italic>s</italic> belongs to the <italic>n</italic>-th cluster.</p>
<p>To obtain a taxonomy of shapes that would describe the spines in both time points equally well, we applied clustering to data <italic>ACTIVE</italic> &#x0222A; <italic>CONTROL</italic> from both time points <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub>. Consequently, each spine was included twice and assigned two vectors of weights. Spine <italic>s</italic> at time <italic>t</italic><sub>0</sub> is assigned the vector <italic>w</italic><sup>0</sup>(<italic>s</italic>) and at time <italic>t</italic><sub>1</sub> the vector <italic>w</italic><sup>1</sup>(<italic>s</italic>). We denote <inline-formula><mml:math id="M2"><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> as the probability that spine <italic>s</italic> belongs to cluster <italic>n</italic> at time <italic>t</italic><sub><italic>i</italic></sub>.</p>
<p>The above clustering algorithms have either one (<italic>hierarchical</italic>) or two (<italic>cmeans</italic>) parameters: <italic>k</italic> - number of clusters and <italic>m</italic> - fuzzifier (indicates cluster fuzziness). A large <italic>m</italic> results in smaller weights and more fuzzy clusters. For small <italic>m</italic>, e.g., <italic>m</italic> &#x0003D; 1, we obtain results close to <italic>crisp</italic> clustering. Consequently, low values of both <italic>k</italic> and <italic>m</italic> are preferred. Although these parameters can be selected in many ways, we decided to use the <italic>Within Cluster Sum of Squares</italic> (<italic>WSS</italic>) (Thorndike, <xref ref-type="bibr" rid="B35">1953</xref>). The definition of <italic>WSS</italic> is as follows: <inline-formula><mml:math id="M3"><mml:mi>W</mml:mi><mml:mi>S</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>.</mml:mo><mml:mo>.</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:munder><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msup><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover><mml:mo>-</mml:mo><mml:mover accent="true"><mml:mrow><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> where <inline-formula><mml:math id="M4"><mml:mover accent="true"><mml:mrow><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x000B7;</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula> is the <italic>n</italic>-th cluster centroid and <inline-formula><mml:math id="M5"><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover></mml:math></inline-formula> stands for the vector of features assigned to object <italic>s</italic>. <italic>WSS</italic> has several good properties; i.e., simple meaning, applicability to both crisp and fuzzy cases, and the same behavior no matter what data and what clustering algorithm are used (it decreases when <italic>k</italic> increases and when <italic>m</italic> decreases). For a balance between the number of clusters, data fitness values of <italic>k</italic> and <italic>m</italic> at the &#x0201C;knee point&#x0201D; (the point where <italic>WSS</italic> plot bends the most) should be selected.</p>
</sec>
<sec>
<title>3.3. Shape transition model</title>
<sec>
<title>3.3.1. Assumptions and brief description</title>
<p>It has been showed that the initial dendritic spine morphology may influence how this structure will change upon specific treatment (Matsuzaki et al., <xref ref-type="bibr" rid="B19">2004</xref>; Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>); i.e., the induction of long-term potentiation. Therefore, we assume that changes of spines depend on their initial shapes and that each spine follows patterns of behavior highly correlated with its initial shape. We introduce a novel probabilistic model of behavior that relies on these principles.</p>
<p>The shapes of dendritic spines are represented as weights of shape clusters <italic>w</italic><sub><italic>n</italic></sub>(<italic>s</italic>). The changes of spines shapes are represented by the combinations of behavior patterns represented with probabilities <italic>P</italic>(<italic>C</italic><sub><italic>n</italic></sub> &#x02192; <italic>C</italic><sub><italic>m</italic></sub>|<italic>C</italic><sub><italic>n</italic></sub>) or the probability that the shape represented by cluster <italic>C</italic><sub><italic>n</italic></sub> will change into the shape represented by cluster <italic>C</italic><sub><italic>m</italic></sub> when <italic>t</italic><sub>0</sub> &#x02192; <italic>t</italic><sub>1</sub>. Probabilities <italic>P</italic> can be stored in a <italic>k</italic>&#x000D7;<italic>k</italic> matrix called <italic>transition matrix</italic>, where rows are enumerated with <italic>n</italic> and columns with <italic>m</italic>. An even more convenient representation of the same information is a graph, where nodes represent shape clusters and edges are labeled with probabilities, denoted as a <italic>transition graph</italic> (i.e., <bold>Figures 3, 4</bold>).</p>
</sec>
<sec>
<title>3.3.2. Probability estimation</title>
<p>In the <italic>crisp</italic>, e.g., <italic>hierarchical</italic> model of shapes, we can estimate the probability <italic>P</italic> as follows: <inline-formula><mml:math id="M6"><mml:msub><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo><mml:msub><mml:mrow><mml:mi>C</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x000B7;</mml:mo><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:munder class="msub"><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>. In the denominator, we have the number of spines that belong to cluster <italic>C</italic><sub><italic>n</italic></sub> in time <italic>t</italic><sub>0</sub> (normalizer). In the nominator, there is the number of spines that belong to cluster <italic>C</italic><sub><italic>n</italic></sub> in time <italic>t</italic><sub>0</sub> and to cluster <italic>C</italic><sub><italic>m</italic></sub> in time <italic>t</italic><sub>1</sub> (recall that only for one <italic>n</italic> in <inline-formula><mml:math id="M7"><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> and for one <italic>m</italic> in a <inline-formula><mml:math id="M8"><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>, the values are ones; elsewhere, they are zeros). With such a computation, we consider how many spines moved from shape cluster <italic>C</italic><sub><italic>n</italic></sub> to <italic>C</italic><sub><italic>m</italic></sub> and normalize it by the number of all spines in the initial cluster <italic>C</italic><sub><italic>n</italic></sub>.</p>
<p>There are arbitrarily many generalizations that are consistent with the above crisp derivation for the fuzzy model, (e.g., the <italic>cmeans</italic> model); i.e., <inline-formula><mml:math id="M9"><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>&#x000B7;</mml:mo><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> can be reformulated in many ways without changing the values of <italic>P</italic><sub><italic>crisp</italic></sub>, e.g., as <inline-formula><mml:math id="M10"><mml:mo class="qopname">min</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>. We suggest using the generalization for which the model minimizes the prediction error for the distribution of shapes at time <italic>t</italic><sub>1</sub>. The probability that spine <italic>s</italic> in time <italic>t</italic><sub>1</sub> will be in cluster <italic>C</italic><sub><italic>m</italic></sub> for our linear model is given according to the law of total probability as follows:
<disp-formula id="E1"><label>(1)</label><mml:math id="M17"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi></mml:mrow><mml:mn>1</mml:mn></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mi>n</mml:mi></mml:munder></mml:mstyle><mml:mi>P</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x022C5;</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mn>0</mml:mn></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
The overall prediction error can be computed as a sum of squared differences between predicted (<inline-formula><mml:math id="M12"><mml:msubsup><mml:mrow><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula>) and derived probabilities (<italic>P</italic><sup>1</sup>):
<disp-formula id="E2"><label>(2)</label><mml:math id="M25"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:mi>E</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mi>s</mml:mi></mml:munder></mml:mstyle><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mi>m</mml:mi></mml:munder></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi></mml:mrow><mml:mn>1</mml:mn></mml:msubsup><mml:mo stretchy='false'>(</mml:mo><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo stretchy='false'>)</mml:mo><mml:mo>&#x02212;</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mn>1</mml:mn></mml:msup><mml:mo stretchy='false'>(</mml:mo><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo stretchy='false'>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
where for each spine <italic>s</italic> in the data, we compare the membership for cluster <italic>C</italic><sub><italic>m</italic></sub> at time <italic>t</italic><sub>1</sub> with the prediction of the model. The problem can be now formulated as an optimization task where we search for probabilities <italic>P</italic>(<italic>C</italic><sub><italic>n</italic></sub> &#x02192; <italic>C</italic><sub><italic>m</italic></sub>|<italic>C</italic><sub><italic>n</italic></sub>) that minimize the overall prediction error <italic>E</italic>:
<disp-formula id="E3"><label>(3)</label><mml:math id="M19"><mml:mtable columnalign='left'><mml:mtr><mml:mtd><mml:mi>o</mml:mi><mml:mi>b</mml:mi><mml:mi>j</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>v</mml:mi><mml:mi>e</mml:mi><mml:mtext>&#x02009;&#x02009;</mml:mtext><mml:mo>:</mml:mo><mml:mtext>&#x02009;</mml:mtext><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>g</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>E</mml:mi></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mi>s</mml:mi><mml:mi>u</mml:mi><mml:mi>b</mml:mi><mml:mi>j</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mtext>&#x000A0;</mml:mtext><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mtext>&#x02009;</mml:mtext><mml:mo>:</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mtext>&#x02009;</mml:mtext><mml:mi>P</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x02265;</mml:mo><mml:mn>0</mml:mn></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mtext>&#x02009;</mml:mtext><mml:msub><mml:mo>&#x02200;</mml:mo><mml:mi>s</mml:mi></mml:msub><mml:msub><mml:mo>&#x02200;</mml:mo><mml:mi>n</mml:mi></mml:msub><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mi>m</mml:mi></mml:msub></mml:mstyle><mml:mi>P</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
The above derivations can be easily represented in matrix form, and the above optimization problem is an example of a standard quadratic programming optimization task with constraints. The details are presented in Section <xref ref-type="supplementary-material" rid="SM1">S2</xref> in Supplementary Material.</p>
</sec>
<sec>
<title>3.3.3. Prediction of the weights at time t1</title>
<p>To verify the model (for example, in the case of cross-validation procedure), or apply it to new datasets, we implemented the computational method to estimate structural changes (described here as 2D descriptors) of a spine in time. The estimation of weights in time <italic>t</italic><sub>1</sub> for a new spine <italic>s</italic> (not in the training data) is not always obvious. For <italic>hierarchical</italic> clustering, we used a first nearest neighbor classifier for parameters in time <italic>t</italic><sub>0</sub>; i.e., we searched for the most similar sample vector (<italic>s</italic>&#x02032;), in time <italic>t</italic><sub>0</sub>, from the training data and assigned <italic>w</italic>(<italic>s</italic>) &#x0003D; <italic>w</italic>(<italic>s</italic>&#x02032;), where <italic>w</italic><sup>0</sup>(<italic>s</italic>) is the classification and <italic>w</italic><sup>1</sup>(<italic>s</italic>) is the estimation of changes of <italic>s</italic> in time. For <italic>cmeans</italic> clustering, the prediction of weights of a new spine (<italic>s</italic>) is more straightforward. Each spine, whether from the training data or not, has weights (<italic>w</italic><sup>0</sup>) assigned according to the same explicit formula: <inline-formula><mml:math id="M15"><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mstyle displaystyle='true'><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula> where <inline-formula><mml:math id="M27"><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mstyle displaystyle='true'><mml:msubsup><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msubsup></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:mo>|</mml:mo><mml:mo>|</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>c</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo><mml:mo>|</mml:mo></mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mo>|</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mstyle mathvariant="bold"><mml:mtext>c</mml:mtext></mml:mstyle></mml:mrow><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo><mml:mo>|</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mfrac><mml:mrow><mml:mn>2</mml:mn></mml:mrow><mml:mrow><mml:mi>m</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:math></inline-formula> where <bold>c</bold><sub><italic>n</italic></sub> is the <italic>n</italic>-th cluster centroid. This calculates the probability that a given spine is in the <italic>n</italic>-th cluster based on the distance from the cluster centroid. Estimation of the weights <italic>w</italic><sup>1</sup>(<italic>s</italic>) can be calculated as matrix-multiplication with transition matrix <italic>w</italic><sup>1</sup>(<italic>s</italic>) &#x0003D; <italic>Pw</italic><sup>0</sup>(<italic>s</italic>), where <italic>P</italic> &#x0003D; [<italic>p</italic><sub><italic>i, j</italic></sub>] and <italic>p</italic><sub><italic>i, j</italic></sub> &#x0003D; <italic>P</italic>(<italic>C</italic><sub><italic>j</italic></sub> &#x02192; <italic>C</italic><sub><italic>i</italic></sub>|<italic>C</italic><sub><italic>j</italic></sub>).</p>
</sec>
<sec>
<title>3.3.4. Parameter reliability</title>
<p>To derive information on the reliability of the obtained probabilities, we use the following bootstrap-based procedure. We generate <italic>R</italic> &#x0003D; 1000 new populations sampled with replacement from the original population. For each new population, we calculate all the probabilities again. The average squared differences between the probabilities for the new populations and the original populations are used as the estimates of parameter errors. Formally, the error of the probability <italic>P</italic>(<italic>C</italic><sub><italic>n</italic></sub> &#x02192; <italic>C</italic><sub><italic>m</italic></sub>|<italic>C</italic><sub><italic>n</italic></sub>) is calculated as:
<disp-formula id="E4"><label>(4)</label><mml:math id="M20"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:mi>S</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mi>R</mml:mi></mml:mfrac><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>..</mml:mo><mml:mi>R</mml:mi></mml:mrow></mml:munder></mml:mstyle><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>P</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x02212;</mml:mo><mml:mi>P</mml:mi><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>&#x02192;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo stretchy='false'>)</mml:mo><mml:mo>&#x0007C;</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:msqrt></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
where <italic>P</italic>(<italic>C</italic><sub><italic>n</italic></sub> &#x02192; <italic>C</italic><sub><italic>m</italic></sub>|<italic>C</italic><sub><italic>n</italic></sub>)|<italic>r</italic> denotes the probability calculated for the <italic>r</italic>-th bootstrap population.</p>
</sec>
</sec>
<sec>
<title>3.4. Comparison of models</title>
<p>Bootstrap Hypothesis Testing (Efron and Tibshirani, <xref ref-type="bibr" rid="B5">1993</xref>) is a method of testing statistical hypotheses. To apply the method, one has to first modify the testing sample so that the null hypothesis is satisfied. Subsequently, a large number of bootstrap samples are drawn from such a modified sample. Finally, for the fixed statistic of interest, one must evaluate how extreme the value of the statistic is for the original sample compared with the values obtained for the drawn bootstrap samples.</p>
<p>This general rule in our case proceeds as follows. We take the two groups <italic>ACTIVE300</italic> and <italic>CONTROL300</italic> and join them into one group <italic>ACTIVE300</italic> &#x0222A; <italic>CONTROL300</italic>. This group contains information about changes between t0 and t1 time. At each iteration of bootstrap sampling, two new groups are drawn from the joint dataset. This way, the null hypothesis of a common distribution for both groups is satisfied. Next, for each bootstrap, the sample clusters and <italic>Shape Transition Model</italic> are constructed for both groups. Then, the test statistic is computed. Finally, the statistic are computed on models built from the original groups and compared with the bootstrap sampling results.</p>
<sec>
<title>3.4.1. Comparison of changes in cluster distributions</title>
<p>We cluster spines according to their shapes (see Section 3.2). As a result, for each spine <italic>s</italic> at <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub>, we obtain the set of weights representing a mixture of shapes. Then, we derive the overall distribution (total weights) of shapes (by shapes, we mean clusters of shapes) at both <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub>. The <italic>n</italic>-th cluster total weight (in the case of <italic>crisp</italic>; e.g., <italic>hierarchical</italic> clustering, it is equivalent to the number of spines) in <italic>t</italic><sub>0</sub> is equal to <inline-formula><mml:math id="M26"><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula> and in <italic>t</italic><sub>1</sub> is equal to <inline-formula><mml:math id="M28"><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>. Consequently, the relative change in the <italic>n</italic>-th cluster weight between <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub> for population <italic>G</italic> can be computed as follows: <inline-formula><mml:math id="M29"><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>G</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:mi>G</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:mi>G</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mstyle displaystyle='true'><mml:msub><mml:mrow><mml:mo>&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x02208;</mml:mo><mml:mi>G</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:msubsup><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>. The statistic that measures the difference between relative changes in distributions of shapes for populations <italic>G</italic><sub>1</sub>, <italic>G</italic><sub>2</sub> can be now defined as:</p>
<disp-formula id="E5"><label>(5)</label><mml:math id="M21"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:mi>R</mml:mi><mml:mi>D</mml:mi><mml:mi>C</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy='false'>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>..</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:munder></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo stretchy='false'>(</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo stretchy='false'>)</mml:mo><mml:mo>&#x02212;</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo stretchy='false'>(</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy='false'>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
</sec>
<sec>
<title>3.4.2. Comparison of transition matrices</title>
<p>By applying the <italic>Shape Transition Model</italic> (see Section 3.3), we construct two Markov matrices (<italic>transition matrices</italic>) describing the transitions for both populations. To check how similar the matrices are, we also decided to apply bootstrap hypothesis testing. For comparing the matrices, we use the sum of squared differences between corresponding cells from the two matrices:
<disp-formula id="E6"><label>(6)</label><mml:math id="M22"><mml:mrow><mml:mtable columnalign='left'><mml:mtr columnalign='left'><mml:mtd columnalign='left'><mml:mrow><mml:mi>S</mml:mi><mml:mi>M</mml:mi><mml:mi>D</mml:mi><mml:mo stretchy='false'>(</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy='false'>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>..</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:munder></mml:mstyle><mml:mstyle displaystyle='true'><mml:munder><mml:mrow><mml:msup><mml:mstyle mathsize='140%' displaystyle='true'><mml:mo>&#x02211;</mml:mo></mml:mstyle><mml:mtext>&#x0200B;</mml:mtext></mml:msup></mml:mrow><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>..</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:munder></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>&#x02212;</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>&#x0007C;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:math></disp-formula>
where <italic>G</italic><sub>1</sub>, <italic>G</italic><sub>2</sub> are populations, e.g., <italic>ACTIVE300</italic>, <italic>CONTROL300</italic>, to be compared. <italic>P</italic><sub><italic>nm</italic></sub>|<italic>G</italic><sub><italic>i</italic></sub> &#x02261; <italic>P</italic>(<italic>C</italic><sub><italic>n</italic></sub> &#x02192; <italic>C</italic><sub><italic>m</italic></sub>|<italic>C</italic><sub><italic>n</italic></sub>)|<italic>G</italic><sub><italic>i</italic></sub> stands for the value of a cell in the <italic>n</italic>-th row and in the <italic>m</italic>-th column of the transition matrix <italic>P</italic> built with data from population <italic>G</italic><sub><italic>i</italic></sub>.</p>
</sec>
</sec>
</sec>
<sec sec-type="results" id="s4">
<title>4. Results</title>
<p>Here, we provide an example of an application of the method. To obtain the taxonomy of spine shapes, we applied <italic>cmeans</italic> and <italic>hierarchical</italic> clustering to <italic>DESCRIPTORS</italic><sup><italic>PCA</italic></sup> for <italic>ACTIVE</italic> &#x0222A; <italic>CONTROL</italic> for <italic>t</italic><sub>0</sub> and <italic>t</italic><sub>1</sub>. To select the proper values of the parameters, we used <italic>WSS</italic> plots with &#x0201C;knee&#x0201D; shapes (see Figure <xref ref-type="supplementary-material" rid="SM1">S3</xref>). We obtained <italic>k</italic> &#x0003D; 10 for <italic>hierarchical</italic> and <italic>k</italic> &#x0003D; 8, <italic>m</italic> &#x0003D; 4 for <italic>cmeans</italic> clustering. According to <italic>WSS</italic> measures, these values ensure a good balance between the complexity of the results; i.e., the number of clusters and quality of cluster fitness.</p>
<p>Figure <xref ref-type="fig" rid="F2">2A</xref> presents the results of <italic>hierarchical</italic> clustering calculated for <italic>ACTIVE</italic> &#x0222A; <italic>CONTROL</italic> according to the procedure described in Section 3.2. Each spine is represented with a single point, and the colors represent the cluster memberships. For each cluster, we identified three representative spines lying nearest to the cluster center. Representative spines are shown in Figure <xref ref-type="fig" rid="F2">2B</xref>. The obtained clusters express the universal taxonomy of shapes that will be later employed for the computation of <italic>Shape Transition Model</italic> for <italic>ACTIVE</italic>, <italic>CONTROL</italic>, <italic>ACTIVE300</italic>, and <italic>CONTROL300</italic>. Representative spines can be used for visual inspection and biological interpretation.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p><bold>(A)</bold> Distribution of spine clusters obtained by <italic>hierarchical</italic> clustering. <bold>(B)</bold> Representative spines obtained for <italic>ACTIVE</italic> &#x0222A; <italic>CONTROL</italic>. The presented clusters represent the universal taxonomy of spine shapes. For each cluster, we present three spines that are nearest to the cluster center. Representative spines facilitate visual aid for interpretation purposes.</p></caption>
<graphic xlink:href="fncom-10-00140-g0002.tif"/>
</fig>
<p>Apart from <italic>hierarchical</italic> clustering, we also consider <italic>cmeans</italic> clustering. Table <xref ref-type="table" rid="T3">3</xref> presents the comparison of the prediction error <italic>E</italic> for both methods. Values were obtained using 10-fold cross-validation. For the purposes of cross-validation, the dataset was randomly separated into ten (10) subsets. Numbers from the same column but in different rows should not be compared. Different clustering methods result in different shape clusters that have different members and thus are incomparable. Although the errors <italic>E</italic> for different methods have different ranges and cannot be compared, different models with the same method can be compared.</p>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p><bold>Prediction error <italic><bold>E</bold></italic> for various models and clustering methods</bold>.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Clustering method</bold></th>
<th valign="top" align="center"><italic><bold>Shape transition model</bold></italic></th>
<th valign="top" align="center"><bold>Majority vote</bold></th>
<th valign="top" align="center"><bold>No transitions</bold></th>
<th valign="top" align="center"><bold>Random transitions</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><italic>hierarchical</italic></td>
<td valign="top" align="center">0.266 &#x000B1; 0.147</td>
<td valign="top" align="center">0.395 &#x000B1; 0.237</td>
<td valign="top" align="center">0.433 &#x000B1; 0.242</td>
<td valign="top" align="center">0.997 &#x000B1; 0.124</td>
</tr>
<tr>
<td valign="top" align="left"><italic>cmeans</italic></td>
<td valign="top" align="center">0.024 &#x000B1; 0.004</td>
<td valign="top" align="center">0.853 &#x000B1; 0.029</td>
<td valign="top" align="center">0.037 &#x000B1; 0.007</td>
<td valign="top" align="center">0.054 &#x000B1; 0.012</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>Values were obtained using 10-fold cross-validation on ACTIVE&#x0222A;CONTROL. Values in columns should not be compared. For both clustering methods, Shape Transition Model performs better than the baseline</italic>.</p>
</table-wrap-foot>
</table-wrap>
<p>The <italic>Shape Transition Model</italic> is compared with three baselines. The first baseline is the majority vote model, where all spines from a particular cluster move to a single destination cluster that is selected as the most popular choice. The second baseline is the model, where we assume that all spines remain in the initial clusters, i.e., weights in <italic>t</italic><sub>1</sub> are the same as in <italic>t</italic><sub>0</sub>. Finally, the third baseline assumes random values for the probability <italic>P</italic>. For both clustering methods, the <italic>Shape Transition Model</italic> has the smallest error <italic>E</italic> and predicts spine behavior the best.</p>
<p><italic>Transition graphs</italic> of the <italic>Shape Transition Model</italic> for <italic>ACTIVE</italic> and <italic>CONTROL</italic> are shown in Figures <xref ref-type="fig" rid="F3">3A,B</xref>. Each cluster of shapes is represented by an oval. Initial sizes, i.e., weights of clusters (for <italic>hierarchical</italic> clustering equivalent to number of spines), are listed. Edges representing transitions are labeled with probability <italic>P</italic>. They are filtered out, and only transitions (probabilities) greater than 20% of the initial weight are visible.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p><bold><italic><bold>Transition graphs</bold></italic> for <italic><bold>hierarchical</bold></italic> clustering</bold>. For each cluster, the initial weight (number of spines in the cluster) is presented. Only transitions (probabilities) of values higher than 20% are shown. Only clusters 1&#x02013;5 are well represented in the data. Transitions for the remaining clusters are uncertain. <bold>(A)</bold> <italic>Transition graph</italic> for <italic>CONTROL</italic>. <bold>(B)</bold> <italic>Transition graph</italic> for <italic>ACTIVE</italic>.</p></caption>
<graphic xlink:href="fncom-10-00140-g0003.tif"/>
</fig>
<p>Only five clusters (numbers 1&#x02013;5) are well represented in the data. Clusters 1, 2, and 4 are the most dense. Clusters 3 and 5 are interpreted as peripheral. Finally, clusters 6&#x02013;10 have only a few spines. For transitions from clusters 6&#x02013;10, high errors were obtained. For example, <italic>SE</italic> for <italic>P</italic>(<italic>C</italic><sub>9</sub> &#x02192; <italic>C</italic><sub>10</sub>|<italic>C</italic><sub>9</sub>) is equal to 66%. Conclusions concerning clusters 6&#x02013;10 are not reliable. Analogous plots of clustering results and <italic>transition graphs</italic> for <italic>cmeans</italic> are presented in Figures <xref ref-type="supplementary-material" rid="SM1">S4</xref>, <xref ref-type="supplementary-material" rid="SM1">S5A,B</xref>.</p>
<p>Graphs presented in Figures <xref ref-type="fig" rid="F3">3A,B</xref> should not be compared because they are computed for populations of different characteristic at <italic>t</italic><sub>0</sub>. Alternatively, Figure <xref ref-type="fig" rid="F4">4</xref> presents a comparison of the <italic>transition graphs</italic> for <italic>CONTROL300</italic> and <italic>ACTIVE300</italic> for <italic>hierarchical</italic> clustering (the exact values of the probabilities can be found in Table <xref ref-type="supplementary-material" rid="SM1">S1</xref>). A similar analysis for <italic>cmeans</italic> is presented in Figure <xref ref-type="supplementary-material" rid="SM1">S6</xref>, and the values of the transitions in percent can be found in Table <xref ref-type="supplementary-material" rid="SM1">S2</xref>.</p>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p><bold>Comparison of the <italic><bold>transition graphs</bold></italic> for balanced subpopulations and <italic><bold>hierarchical</bold></italic> clustering</bold>. For each cluster, the initial weight (number of spines in the cluster) is presented. Values are given in percents. Only transitions (probabilities) of values higher than 20% are shown. Differences in transitions between graphs are observed, but because of high uncertainties, none of them is significant. <bold>(A)</bold> <italic>Transition graph</italic> for <italic>CONTROL300</italic>. <bold>(B)</bold> <italic>Transition graph</italic> for <italic>ACTIVE300</italic>.</p></caption>
<graphic xlink:href="fncom-10-00140-g0004.tif"/>
</fig>
<p>In the case of the <italic>CONTROL300</italic> and <italic>ACTIVE300</italic> subsets (Figure <xref ref-type="fig" rid="F4">4</xref>), only clusters 1, 2, and 4 contain enough spines to produce credible conclusions. For <italic>CONTROL300</italic>, cluster 1 has a slightly stronger inertia than for <italic>ACTIVE300</italic> (91 vs. 87% spines remained in the same cluster). For cluster 2, the situation is the opposite: 41% of spines from cluster 2 for <italic>CONTROL300</italic> remain in cluster 2 compared with 67% for <italic>ACTIVE300</italic>. For both populations, a large transition of spines from cluster 2 to cluster 1 is observable. However, for <italic>CONTROL300</italic>, it is present for 52% of the spines, whereas for <italic>ACTIVE300</italic>, it is present only for 28%. Another difference is visible for transitions from cluster 4. For <italic>CONTROL300</italic>, 73% of spines move to cluster 1 and 27% to cluster 2. For <italic>ACTIVE300</italic>, only 54% of spines move to cluster 1, and the rest move to clusters 2&#x02013;5. Unfortunately, none of the observed differences is significant when the errors are taken into consideration. Therefore, to identify such differences, the models must be compared as a whole.</p>
<p>Table <xref ref-type="table" rid="T4">4</xref> presents <italic>p</italic>-values of <italic>RDC</italic> and <italic>SMD</italic> statistics (Equations 5 and 6) used for a comparison of models for <italic>ACTIVE300</italic> and <italic>CONTROL300</italic>. Results below 0.05 are marked in bold font. Detailed plots of the statistical distributions using kernel estimation are shown in Figures S7, S8. For <italic>hierarchical</italic> clustering, only <italic>SMD</italic> shows a significant difference between <italic>ACTIVE300</italic> and <italic>CONTROL300</italic>. This statistic compares transitions of spines between shapes, which is well captured by <italic>hierarchical</italic> clustering. The <italic>RDC</italic> statistics depend only on changes of distributions, and <italic>hierarchical</italic> clustering enforces that each spine belongs to only one shape cluster at the particular time point, which may noticeably affect the overall distributions. In contrast, the distributions are well captured by <italic>cmeans</italic> clustering, where each spine is an arbitrary mixture of shapes and <italic>RDC</italic> shows a significant difference. Different clustering methods are sensitive to different properties of the data. The selection of the right clustering method and appropriate test depends on the characteristic of the data that is of interest to the researcher.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p><bold><italic><bold>P</bold></italic>-values of <italic><bold>RDC</bold></italic> and <italic><bold>SMD</bold></italic> statistics with bootstrap tests used to compare balanced subpopulations <italic><bold>ACTIVE300</bold></italic> and <italic><bold>CONTROL300</bold></italic> for various clustering methods</bold>.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Method</bold></th>
<th valign="top" align="center"><bold><italic>RDC p</italic>-value</bold></th>
<th valign="top" align="center"><bold><italic>SMD p</italic>-value</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><italic>hierarchical</italic></td>
<td valign="top" align="center">0.493</td>
<td valign="top" align="center"><bold>0.011</bold></td>
</tr>
<tr>
<td valign="top" align="left"><italic>cmeans</italic></td>
<td valign="top" align="center"><bold>0.004</bold></td>
<td valign="top" align="center">0.298</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>Differences that are statistically significant are shown in bold font</italic>.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="s5">
<title>5. Discussion and conclusions</title>
<p>The majority of excitatory synapses in the brain are located on dendritic spines. These highly dynamic and plastic structures undergo constant morphological changes in different physiological and pathological processes (Kasai et al., <xref ref-type="bibr" rid="B11">2010</xref>). The structure of the dendritic spines is tightly correlated with their function and reflects the synapse properties. Synapse strengthening or weakening along with dendritic spine formation and elimination assure correct processing and storage of the incoming information in the neuronal network. This plastic nature of the dendritic spines allows them to undergo activity-dependent structural modifications, which are thought to underlie learning and memory formation. At the cellular level, the most extensively studied aspect of this phenomena is related to dendritic spine enlargement in response to stimulation.</p>
<p>In this study, we show a computational method that permits statistical analysis of the impact of an externally applied stimulation on the dendritic spine structural dynamics. We applied statistical tests and examined a population consisting of 923 dendritic spines. We used two dissociated neuronal cell cultures and compared the dendritic spine volume and shape changes between two populations at two different states, unstimulated (<italic>CONTROL</italic>) and LTP-stimulated (<italic>ACTIVE</italic>), and at two time points (with a 10-min time interval). We preprocessed the datasets and reduced the dendritic spine number to 300 for each analyzed group.</p>
<p>We provided a probabilistic model for dendritic spine population dynamics. First, the resting state model was constructed (Figure <xref ref-type="fig" rid="F3">3A</xref>). Then, the probabilistic null model for active neurons was built (Figure <xref ref-type="fig" rid="F3">3B</xref>). We showed that LTP treatment induced transition of filopodia-like spines (cluster <bold>4</bold>) into mushroom-shaped spines (cluster <bold>2</bold>). For the first time, we provided exact transition probabilities for this morphological transformation (from cluster <bold>4</bold> to cluster <bold>2</bold>, the transition probability was found to be 0.27 &#x000B1; 0.11). Our result show that in <italic>ACTIVE300</italic> in comparision to <italic>CONTROL300</italic> there is significant group of growing neurons which partially supports the previous studies (Szepesi et al., <xref ref-type="bibr" rid="B33">2014</xref>) that report chemical LTP-induced spine enlargement in dissociated cultures.</p>
<p>Finally, we compared the models for balanced populations (Figure <xref ref-type="fig" rid="F4">4</xref>). We found differences between active and non-active neurons. Unfortunately, none of the observed differences between the models was significant when particular transitions between shape clusters were considered. Such absence of significant differences can be explained by too small number of spines in analyzed data. Large errors predominated the differences between values in cells of appropriate transition matrices. However, statistically significant differences were detected when models of populations were compared. Different clustering algorithms showed statistically significant differences between the two analyzed groups (<italic>ACTIVE300, CONTROL300</italic>). Crisp clustering captured the difference in shapes transitions well, whereas fuzzy clustering captured the difference in changes of shape cluster distributions.</p>
</sec>
<sec id="s6">
<title>Ethics statement</title>
<p>All experimental procedures were carried out in accordance with the Ethical Committee on Animal Research of the Nencki Institute, based on the Polish Act on Animal Welfare and other national laws that are in full agreement with EU directive on animal experimentation.</p>
</sec>
<sec id="s7">
<title>Author contributions</title>
<p>MM and MR performed biological experiments and did manually segmentation of spines from confocal microscope images. TK, M&#x00141;, GB, and DP designed the computational method and performed statistical analysis. GB contributed in the data analysis and visualization. All authors read and approved the final manuscript.</p>
</sec>
<sec id="s8">
<title>Funding</title>
<p>TK and M&#x00141; were partially supported by research fellowships within &#x0201C;Information technologies: research and their interdisciplinary applications&#x0201D; agreement POKL.04.01.01-00-051/10-00. MM and MR were supported by the grants no. 6651/B/P01/2011/40 and UMO-2015/17/B/NZ3/00557 from National Science Centre Poland. DP, GB, TK, and M&#x00141; was supported by the Polish National Science Centre (Grant numbers 2013/09/B/NZ2/00121 and 2014/15/B/ST6/05082) and COST BM1405 and BM1408 EU actions.</p>
<sec>
<title>Conflict of interest statement</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
</sec>
</body>
<back>
<ack>
<p>The authors are grateful to Prof. Jakub Wlodarczyk, Prof. Grzegorz Wilczynski, and Prof. Subhadip Basu for extensive discussions on the information processing problem in neuronal systems and especially to Blazej Ruszczycki for preparation of the segmentation software used for acquiring the morphological descriptors. Some calculations were performed at the Interdisciplinary Centre for Mathematical and Computational Modelling, University of Warsaw, grant No. G49-19. The data used in the experimental part of the study were gathered in the Laboratory of Cell Biophysics at Nencki Institute of Experimental Biology under the supervision of Prof. Jakub Wlodarczyk. We would like to thank Wayne Dawson for help with editing the final version of the manuscript. The authors are grateful to reviewers for their remark.</p>
</ack>
<sec sec-type="supplementary-material" id="s9">
<title>Supplementary material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="http://journal.frontiersin.org/article/10.3389/fncom.2016.00140/full#supplementary-material">http://journal.frontiersin.org/article/10.3389/fncom.2016.00140/full#supplementary-material</ext-link></p>
<supplementary-material xlink:href="DataSheet1.pdf" id="SM1" mimetype="application/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Araya</surname> <given-names>R.</given-names></name> <name><surname>Jiang</surname> <given-names>J.</given-names></name> <name><surname>Eisenthal</surname> <given-names>K. B.</given-names></name> <name><surname>Yuste</surname> <given-names>R.</given-names></name></person-group> (<year>2006</year>). <article-title>The spine neck filters membrane potentials</article-title>. <source>Proc. Natl. Acad. Sci. U.S.A.</source> <volume>103</volume>, <fpage>17961</fpage>&#x02013;<lpage>17966</lpage>. <pub-id pub-id-type="doi">10.1073/pnas.0608755103</pub-id><pub-id pub-id-type="pmid">17093040</pub-id></citation>
</ref>
<ref id="B2">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Bezdek</surname> <given-names>J. C.</given-names></name></person-group> (<year>1981</year>).<source>Pattern Recognition with Fuzzy Objective Function Algorithms</source>. <publisher-loc>Norwell, MA</publisher-loc>: <publisher-name>Kluwer Academic Publishers</publisher-name>. <pub-id pub-id-type="doi">10.1007/978-1-4757-0450-1</pub-id></citation>
</ref>
<ref id="B3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Caroni</surname> <given-names>P.</given-names></name> <name><surname>Donato</surname> <given-names>F.</given-names></name> <name><surname>Muller</surname> <given-names>D.</given-names></name></person-group> (<year>2012</year>). <article-title>Structural plasticity upon learning: regulation and functions</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>13</volume>, <fpage>478</fpage>&#x02013;<lpage>490</lpage>. <pub-id pub-id-type="doi">10.1038/nrn3258</pub-id><pub-id pub-id-type="pmid">22714019</pub-id></citation>
</ref>
<ref id="B4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>DeKosky</surname> <given-names>S. T.</given-names></name> <name><surname>Scheff</surname> <given-names>S. W.</given-names></name></person-group> (<year>1990</year>). <article-title>Synapse loss in frontal cortex biopsies in Alzheimer&#x00027;s disease: correlation with cognitive severity</article-title>. <source>Ann. Neurol.</source> <volume>27</volume>, <fpage>457</fpage>&#x02013;<lpage>464</lpage>. <pub-id pub-id-type="doi">10.1002/ana.410270502</pub-id><pub-id pub-id-type="pmid">2360787</pub-id></citation>
</ref>
<ref id="B5">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Efron</surname> <given-names>B.</given-names></name> <name><surname>Tibshirani</surname> <given-names>R.</given-names></name></person-group> (<year>1993</year>). <source>An Introduction to the Bootstrap</source>. <publisher-loc>New York, NY</publisher-loc>: <publisher-name>Macmillan Publishers Limited</publisher-name>. <pub-id pub-id-type="doi">10.1007/978-1-4899-4541-9</pub-id></citation>
</ref>
<ref id="B6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fanti</surname> <given-names>Z.</given-names></name> <name><surname>Elena Martinez-Perez</surname> <given-names>M.</given-names></name> <name><surname>De-Miguel</surname> <given-names>F. F.</given-names></name></person-group> (<year>2011</year>). <article-title>Neurongrowth, a software for automatic quantification of neurite and filopodial dynamics from time-lapse sequences of digital images</article-title>. <source>Dev. Neurobiol.</source> <volume>71</volume>, <fpage>870</fpage>&#x02013;<lpage>881</lpage>. <pub-id pub-id-type="doi">10.1002/dneu.20866</pub-id><pub-id pub-id-type="pmid">21913334</pub-id></citation>
</ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Holtmaat</surname> <given-names>A.</given-names></name> <name><surname>Svoboda</surname> <given-names>K.</given-names></name></person-group> (<year>2009</year>). <article-title>Experience-dependent structural synaptic plasticity in the mammalian brain</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>10</volume>, <fpage>647</fpage>&#x02013;<lpage>658</lpage>. <pub-id pub-id-type="doi">10.1038/nrn2699</pub-id><pub-id pub-id-type="pmid">19693029</pub-id></citation>
</ref>
<ref id="B8">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hutsler</surname> <given-names>J. J.</given-names></name> <name><surname>Zhang</surname> <given-names>H.</given-names></name></person-group> (<year>2010</year>). <article-title>Increased dendritic spine densities on cortical projection neurons in autism spectrum disorders</article-title>. <source>Brain Res.</source> <volume>1309</volume>, <fpage>83</fpage>&#x02013;<lpage>94</lpage>. <pub-id pub-id-type="doi">10.1016/j.brainres.2009.09.120</pub-id><pub-id pub-id-type="pmid">19896929</pub-id></citation>
</ref>
<ref id="B9">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Irwin</surname> <given-names>S. A.</given-names></name> <name><surname>Patel</surname> <given-names>B.</given-names></name> <name><surname>Idupulapati</surname> <given-names>M.</given-names></name> <name><surname>Harris</surname> <given-names>J. B.</given-names></name> <name><surname>Crisostomo</surname> <given-names>R. A.</given-names></name> <name><surname>Larsen</surname> <given-names>B. P.</given-names></name> <etal/></person-group>. (<year>2001</year>). <article-title>Abnormal dendritic spine characteristics in the temporal and visual cortices of patients with fragile-X syndrome: a quantitative examination</article-title>. <source>Am. J. Med. Genet.</source> <volume>98</volume>, <fpage>161</fpage>&#x02013;<lpage>167</lpage>. <pub-id pub-id-type="doi">10.1002/1096-8628(20010115)98:2&#x0003C;161::AID-AJMG1025&#x0003E;3.0.CO;2-B</pub-id><pub-id pub-id-type="pmid">11223852</pub-id></citation>
</ref>
<ref id="B10">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Jolliffe</surname> <given-names>I. T.</given-names></name></person-group> (<year>2002</year>). <source>Principal Component Analysis</source>. <publisher-loc>New York, NY</publisher-loc>: <publisher-name>Springer Verlag</publisher-name>.</citation>
</ref>
<ref id="B11">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kasai</surname> <given-names>H.</given-names></name> <name><surname>Fukuda</surname> <given-names>M.</given-names></name> <name><surname>Watanabe</surname> <given-names>S.</given-names></name> <name><surname>Hayashi-Takagi</surname> <given-names>A.</given-names></name> <name><surname>Noguchi</surname> <given-names>J.</given-names></name></person-group> (<year>2010</year>). <article-title>Structural dynamics of dendritic spines in memory and cognition</article-title>. <source>Trends Neurosci.</source> <volume>33</volume>, <fpage>121</fpage>&#x02013;<lpage>129</lpage>. <pub-id pub-id-type="doi">10.1016/j.tins.2010.01.001</pub-id><pub-id pub-id-type="pmid">20138375</pub-id></citation>
</ref>
<ref id="B12">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kasai</surname> <given-names>H.</given-names></name> <name><surname>Matsuzaki</surname> <given-names>M.</given-names></name> <name><surname>Noguchi</surname> <given-names>J.</given-names></name> <name><surname>Yasumatsu</surname> <given-names>N.</given-names></name> <name><surname>Nakahara</surname> <given-names>H.</given-names></name></person-group> (<year>2003</year>). <article-title>Structure stability function relationships of dendritic spines</article-title>. <source>Trends Neurosci.</source> <volume>26</volume>, <fpage>360</fpage>&#x02013;<lpage>368</lpage>. <pub-id pub-id-type="doi">10.1016/S0166-2236(03)00162-0</pub-id><pub-id pub-id-type="pmid">12850432</pub-id></citation>
</ref>
<ref id="B13">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kharazia</surname> <given-names>V.</given-names></name> <name><surname>Weinberg</surname> <given-names>R.</given-names></name></person-group> (<year>1999</year>). <article-title>Immunogold localization of AMPA and NMDA receptors in somatic sensory cortex of albino rat</article-title>. <source>J. Comp. Neurol.</source> <volume>412</volume>, <fpage>292</fpage>&#x02013;<lpage>302</lpage>. <pub-id pub-id-type="doi">10.1002/(SICI)1096-9861(19990920)412:2&#x0003C;292::AID-CNE8&#x0003E;3.0.CO;2-G</pub-id><pub-id pub-id-type="pmid">10441757</pub-id></citation>
</ref>
<ref id="B14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Knobloch</surname> <given-names>M.</given-names></name> <name><surname>Mansuy</surname> <given-names>I. M.</given-names></name></person-group> (<year>2008</year>). <article-title>Dendritic spine loss and synaptic alterations in Alzheimers disease</article-title>. <source>Mol. Neurobiol.</source> <volume>37</volume>, <fpage>73</fpage>&#x02013;<lpage>82</lpage>. <pub-id pub-id-type="doi">10.1007/s12035-008-8018-z</pub-id><pub-id pub-id-type="pmid">18438727</pub-id></citation>
</ref>
<ref id="B15">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Levenga</surname> <given-names>J.</given-names></name> <name><surname>Willemsen</surname> <given-names>R.</given-names></name></person-group> (<year>2012</year>). <article-title>Chapter 8 - Perturbation of dendritic protrusions in intellectual disability</article-title>, in <source>Down Syndrome: From Understanding the Neurobiology to Therapy, volume 197 of Progress in Brain Research</source>, eds <person-group person-group-type="editor"><name><surname>Dierssen</surname> <given-names>M.</given-names></name> <name><surname>Torre</surname> <given-names>R. D. L.</given-names></name></person-group> (<publisher-loc>Oxford</publisher-loc>: <publisher-name>Elsevier</publisher-name>), <fpage>153</fpage>&#x02013;<lpage>168</lpage>.</citation>
</ref>
<ref id="B16">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Li</surname> <given-names>Q.</given-names></name> <name><surname>Deng</surname> <given-names>Z.</given-names></name></person-group> (<year>2012</year>). <article-title>A surface-based 3-d dendritic spine detection approach from confocal microscopy images</article-title>. <source>IEEE Trans. Image Process.</source> <volume>21</volume>, <fpage>1223</fpage>&#x02013;<lpage>1230</lpage>. <pub-id pub-id-type="doi">10.1109/TIP.2011.2166973</pub-id><pub-id pub-id-type="pmid">21896386</pub-id></citation>
</ref>
<ref id="B17">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Loewenstein</surname> <given-names>Y.</given-names></name> <name><surname>Yanover</surname> <given-names>U.</given-names></name> <name><surname>Rumpel</surname> <given-names>S.</given-names></name></person-group> (<year>2015</year>). <article-title>Predicting the dynamics of network connectivity in the neocortex</article-title>. <source>J. Neurosci.</source> <volume>35</volume>, <fpage>12535</fpage>&#x02013;<lpage>12544</lpage>. <pub-id pub-id-type="doi">10.1523/JNEUROSCI.2917-14.2015</pub-id><pub-id pub-id-type="pmid">26354919</pub-id></citation>
</ref>
<ref id="B18">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Niedringhaus</surname> <given-names>M.</given-names></name> <name><surname>Chen</surname> <given-names>X.</given-names></name> <name><surname>Dzakpasu</surname> <given-names>R.</given-names></name> <name><surname>Conant</surname> <given-names>K.</given-names></name></person-group> (<year>2012</year>). <article-title>MMPs and soluble ICAM-5 increase neuronal excitability within <italic>in vitro</italic> networks of hippocampal neurons</article-title>. <source>PLoS ONE</source> <volume>7</volume>:<fpage>e42631</fpage>. <pub-id pub-id-type="doi">10.1371/journal.pone.0042631</pub-id><pub-id pub-id-type="pmid">22912716</pub-id></citation>
</ref>
<ref id="B19">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Matsuzaki</surname> <given-names>M.</given-names></name> <name><surname>Honkura</surname> <given-names>N.</given-names></name> <name><surname>Ellis-Davies</surname> <given-names>G. C.</given-names></name> <name><surname>Kasai</surname> <given-names>H.</given-names></name></person-group> (<year>2004</year>). <article-title>Structural basis of long-term potentiation in single dendritic spines</article-title>. <source>Nature</source> <volume>429</volume>, <fpage>761</fpage>&#x02013;<lpage>766</lpage>. <pub-id pub-id-type="doi">10.1038/nature02617</pub-id><pub-id pub-id-type="pmid">15190253</pub-id></citation>
</ref>
<ref id="B20">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Oh</surname> <given-names>M. C.</given-names></name> <name><surname>Derkach</surname> <given-names>V. A.</given-names></name> <name><surname>Guire</surname> <given-names>E. S.</given-names></name> <name><surname>Soderling</surname> <given-names>T. R.</given-names></name></person-group> (<year>2006</year>). <article-title>Extrasynaptic membrane trafficking regulated by glur1 serine 845 phosphorylation primes AMPA receptors for long-term potentiation</article-title>. <source>J. Biol. Chem.</source> <volume>281</volume>, <fpage>752</fpage>&#x02013;<lpage>758</lpage>. <pub-id pub-id-type="doi">10.1074/jbc.M509677200</pub-id><pub-id pub-id-type="pmid">16272153</pub-id></citation>
</ref>
<ref id="B21">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Menon</surname> <given-names>V.</given-names></name> <name><surname>Musial</surname> <given-names>T. F.</given-names></name> <name><surname>Liu</surname> <given-names>A.</given-names></name> <name><surname>Katz</surname> <given-names>Y.</given-names></name> <name><surname>Kath</surname> <given-names>W. L.</given-names></name> <name><surname>Spruston</surname> <given-names>N.</given-names></name> <etal/></person-group>. (<year>2013</year>). <article-title>Balanced synaptic impact via distance-dependent synapse distribution and complementary expression of AMPARs and NMDARs in hippocampal dendrites</article-title>. <source>Neuron</source> <volume>80</volume>, <fpage>1451</fpage>&#x02013;<lpage>1463</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuron.2013.09.027</pub-id><pub-id pub-id-type="pmid">24360547</pub-id></citation>
</ref>
<ref id="B22">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Michaluk</surname> <given-names>P.</given-names></name> <name><surname>Wawrzyniak</surname> <given-names>M.</given-names></name> <name><surname>Alot</surname> <given-names>P.</given-names></name> <name><surname>Szczot</surname> <given-names>M.</given-names></name> <name><surname>Wyrembek</surname> <given-names>P.</given-names></name> <name><surname>Mercik</surname> <given-names>K.</given-names></name> <etal/></person-group>. (<year>2011</year>). <article-title>Influence of matrix metalloproteinase MMP-9 on dendritic spine morphology</article-title>. <source>J. Cell Sci.</source> <volume>124</volume>, <fpage>3369</fpage>&#x02013;<lpage>3380</lpage>. <pub-id pub-id-type="doi">10.1242/jcs.090852</pub-id><pub-id pub-id-type="pmid">21896646</pub-id></citation>
</ref>
<ref id="B23">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Murtagh</surname> <given-names>F.</given-names></name></person-group> (<year>1983</year>). <article-title>A survey of recent advances in hierarchical clustering algorithms</article-title>. <source>Comput. J.</source> <volume>26</volume>, <fpage>354</fpage>&#x02013;<lpage>359</lpage>. <pub-id pub-id-type="doi">10.1093/comjnl/26.4.354</pub-id></citation>
</ref>
<ref id="B24">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nunez</surname> <given-names>J.</given-names></name></person-group> (<year>2008</year>). <article-title>Primary culture of hippocampal neurons from P0 newborn rats</article-title>. <source>J. Visual. Exp.</source> 895. <pub-id pub-id-type="doi">10.3791/895</pub-id><pub-id pub-id-type="pmid">19066540</pub-id></citation>
</ref>
<ref id="B25">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nusser</surname> <given-names>Z.</given-names></name> <name><surname>Lujan</surname> <given-names>R.</given-names></name> <name><surname>Laube</surname> <given-names>G.</given-names></name> <name><surname>Roberts</surname> <given-names>J. D. B.</given-names></name> <name><surname>Molnar</surname> <given-names>E.</given-names></name> <name><surname>Somogyi</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>1998</year>). <article-title>Cell type and pathway dependence of synaptic AMPA receptor number and variability in the hippocampus</article-title>. <source>Neuron</source> <volume>21</volume>, <fpage>545</fpage>&#x02013;<lpage>559</lpage>. <pub-id pub-id-type="doi">10.1016/S0896-6273(00)80565-6</pub-id><pub-id pub-id-type="pmid">9768841</pub-id></citation>
</ref>
<ref id="B26">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Penzes</surname> <given-names>P.</given-names></name> <name><surname>Cahill</surname> <given-names>M. E.</given-names></name> <name><surname>Jones</surname> <given-names>K. A.</given-names></name> <name><surname>VanLeeuwen</surname> <given-names>J.-E.</given-names></name> <name><surname>Woolfrey</surname> <given-names>K. M.</given-names></name></person-group> (<year>2011</year>). <article-title>Dendritic spine pathology in neuropsychiatric disorders</article-title>. <source>Nat. Neurosci.</source> <volume>14</volume>, <fpage>285</fpage>&#x02013;<lpage>293</lpage>. <pub-id pub-id-type="doi">10.1038/nn.2741</pub-id><pub-id pub-id-type="pmid">21346746</pub-id></citation>
</ref>
<ref id="B27">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ruszczycki</surname> <given-names>B.</given-names></name> <name><surname>Szepesi</surname> <given-names>Z.</given-names></name> <name><surname>Wilczynski</surname> <given-names>G.</given-names></name> <name><surname>Bijata</surname> <given-names>M.</given-names></name> <name><surname>Kalita</surname> <given-names>K.</given-names></name> <name><surname>Kaczmarek</surname> <given-names>L.</given-names></name> <etal/></person-group>. (<year>2012</year>). <article-title>Sampling issues in quantitative analysis of dendritic spines morphology</article-title>. <source>BMC Bioinformatics</source> <volume>13</volume>:<fpage>213</fpage>. <pub-id pub-id-type="doi">10.1186/1471-2105-13-213</pub-id><pub-id pub-id-type="pmid">22920322</pub-id></citation>
</ref>
<ref id="B28">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Schmitz</surname> <given-names>S. K.</given-names></name> <name><surname>Hjorth</surname> <given-names>J. J.</given-names></name> <name><surname>Joemai</surname> <given-names>R. M.</given-names></name> <name><surname>Wijntjes</surname> <given-names>R.</given-names></name> <name><surname>Eijgenraam</surname> <given-names>S.</given-names></name> <name><surname>de Bruijn</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2011</year>). <article-title>Automated analysis of neuronal morphology, synapse number and synaptic recruitment</article-title>. <source>J. Neurosci. Methods</source> <volume>195</volume>, <fpage>185</fpage>&#x02013;<lpage>193</lpage>. <pub-id pub-id-type="doi">10.1016/j.jneumeth.2010.12.011</pub-id><pub-id pub-id-type="pmid">21167201</pub-id></citation>
</ref>
<ref id="B29">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Selemon</surname> <given-names>L. D.</given-names></name> <name><surname>Begovi&#x00107;</surname> <given-names>A.</given-names></name> <name><surname>Goldman-Rakic</surname> <given-names>P. S.</given-names></name> <name><surname>Castner</surname> <given-names>S. A.</given-names></name></person-group> (<year>2006</year>). <article-title>Amphetamine sensitization alters dendritic morphology in prefrontal cortical pyramidal neurons in the non-human primate</article-title>. <source>Neuropsychopharmacology</source> <volume>32</volume>, <fpage>919</fpage>&#x02013;<lpage>931</lpage>. <pub-id pub-id-type="doi">10.1038/sj.npp.1301179</pub-id><pub-id pub-id-type="pmid">16936713</pub-id></citation>
</ref>
<ref id="B30">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Stawarski</surname> <given-names>M.</given-names></name> <name><surname>Rutkowska-Wlodarczyk</surname> <given-names>I.</given-names></name> <name><surname>Zeug</surname> <given-names>A.</given-names></name> <name><surname>Bijata</surname> <given-names>M.</given-names></name> <name><surname>Madej</surname> <given-names>H.</given-names></name> <name><surname>Kaczmarek</surname> <given-names>L.</given-names></name> <etal/></person-group>. (<year>2014</year>). <article-title>Genetically encoded FRET-based biosensor for imaging MMP-9 activity</article-title>. <source>Biomaterials</source> <volume>35</volume>, <fpage>1402</fpage>&#x02013;<lpage>1410</lpage>. <pub-id pub-id-type="doi">10.1016/j.biomaterials.2013.11.033</pub-id><pub-id pub-id-type="pmid">24290700</pub-id></citation>
</ref>
<ref id="B31">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Su</surname> <given-names>R.</given-names></name> <name><surname>Sun</surname> <given-names>C.</given-names></name> <name><surname>Zhang</surname> <given-names>C.</given-names></name> <name><surname>Pham</surname> <given-names>T. D.</given-names></name></person-group> (<year>2014</year>). <article-title>A novel method for dendritic spines detection based on directional morphological filter and shortest path</article-title>. <source>Comput. Med. Imaging Graph.</source> <volume>38</volume>, <fpage>793</fpage>&#x02013;<lpage>802</lpage>. <pub-id pub-id-type="doi">10.1016/j.compmedimag.2014.07.006</pub-id><pub-id pub-id-type="pmid">25155696</pub-id></citation>
</ref>
<ref id="B32">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sweet</surname> <given-names>R. A.</given-names></name> <name><surname>Henteleff</surname> <given-names>R. A.</given-names></name> <name><surname>Zhang</surname> <given-names>W.</given-names></name> <name><surname>Sampson</surname> <given-names>A. R.</given-names></name> <name><surname>Lewis</surname> <given-names>D. A.</given-names></name></person-group> (<year>2008</year>). <article-title>Reduced dendritic spine density in auditory cortex of subjects with schizophrenia</article-title>. <source>Neuropsychopharmacology</source> <volume>34</volume>, <fpage>374</fpage>&#x02013;<lpage>389</lpage>. <pub-id pub-id-type="doi">10.1038/npp.2008.67</pub-id><pub-id pub-id-type="pmid">18463626</pub-id></citation>
</ref>
<ref id="B33">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Szepesi</surname> <given-names>Z.</given-names></name> <name><surname>Hosy</surname> <given-names>E.</given-names></name> <name><surname>Ruszczycki</surname> <given-names>B.</given-names></name> <name><surname>Bijata</surname> <given-names>M.</given-names></name> <name><surname>Pyskaty</surname> <given-names>M.</given-names></name> <name><surname>Bikbaev</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2014</year>). <article-title>Synaptically released matrix metalloproteinase activity in control of structural plasticity and the cell surface distribution of GluA1-AMPA receptors</article-title>. <source>PLoS ONE</source> <volume>9</volume>:<fpage>e98274</fpage>. <pub-id pub-id-type="doi">10.1371/journal.pone.0098274</pub-id><pub-id pub-id-type="pmid">24853857</pub-id></citation>
</ref>
<ref id="B34">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Takumi</surname> <given-names>Y.</given-names></name> <name><surname>Ram&#x000ED;rez-Le&#x000F3;n</surname> <given-names>V.</given-names></name> <name><surname>Laake</surname> <given-names>P.</given-names></name> <name><surname>Rinvik</surname> <given-names>E.</given-names></name> <name><surname>Ottersen</surname> <given-names>O. P.</given-names></name></person-group> (<year>1999</year>). <article-title>Different modes of expression of AMPA and NMDA receptors in hippocampal synapses</article-title>. <source>Nat. Neurosci.</source> <volume>2</volume>, <fpage>618</fpage>&#x02013;<lpage>624</lpage>. <pub-id pub-id-type="doi">10.1038/10172</pub-id><pub-id pub-id-type="pmid">10409387</pub-id></citation>
</ref>
<ref id="B35">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Thorndike</surname> <given-names>R. L.</given-names></name></person-group> (<year>1953</year>). <article-title>Who belongs in the family?</article-title> <source>Psychometrika</source> <volume>18</volume>, <fpage>267</fpage>&#x02013;<lpage>276</lpage>. <pub-id pub-id-type="doi">10.1007/BF02289263</pub-id></citation>
</ref>
<ref id="B36">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>T&#x000F8;nnesen</surname> <given-names>J.</given-names></name> <name><surname>Katona</surname> <given-names>G.</given-names></name> <name><surname>R&#x000F3;zsa</surname> <given-names>B.</given-names></name> <name><surname>N&#x000E4;gerl</surname> <given-names>U. V.</given-names></name></person-group> (<year>2014</year>). <article-title>Spine neck plasticity regulates compartmentalization of synapses</article-title>. <source>Nat. Neurosci.</source> <volume>17</volume>, <fpage>678</fpage>&#x02013;<lpage>685</lpage>. <pub-id pub-id-type="doi">10.1038/nn.3682</pub-id><pub-id pub-id-type="pmid">24657968</pub-id></citation>
</ref>
<ref id="B37">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Xu</surname> <given-names>T.</given-names></name> <name><surname>Yu</surname> <given-names>X.</given-names></name> <name><surname>Perlik</surname> <given-names>A. J.</given-names></name> <name><surname>Tobin</surname> <given-names>W. F.</given-names></name> <name><surname>Zweig</surname> <given-names>J. A.</given-names></name> <name><surname>Tennant</surname> <given-names>K.</given-names></name> <etal/></person-group>. (<year>2009</year>). <article-title>Rapid formation and selective stabilization of synapses for enduring motor memories</article-title>. <source>Nature</source> <volume>462</volume>, <fpage>915</fpage>&#x02013;<lpage>919</lpage>. <pub-id pub-id-type="doi">10.1038/nature08389</pub-id><pub-id pub-id-type="pmid">19946267</pub-id></citation>
</ref>
<ref id="B38">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yang</surname> <given-names>G.</given-names></name> <name><surname>Pan</surname> <given-names>F.</given-names></name> <name><surname>Gan</surname> <given-names>W.-B.</given-names></name></person-group> (<year>2009</year>). <article-title>Stably maintained dendritic spines are associated with lifelong memories</article-title>. <source>Nature</source> <volume>462</volume>, <fpage>920</fpage>&#x02013;<lpage>924</lpage>. <pub-id pub-id-type="doi">10.1038/nature08577</pub-id><pub-id pub-id-type="pmid">19946265</pub-id></citation>
</ref>
<ref id="B39">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yuste</surname> <given-names>R.</given-names></name> <name><surname>Bonhoeffer</surname> <given-names>T.</given-names></name></person-group> (<year>2001</year>). <article-title>Morphological changes in dendritic spines associated with long-term synaptic plasticity</article-title>. <source>Ann. Rev. Neurosci.</source> <volume>24</volume>, <fpage>1071</fpage>&#x02013;<lpage>1089</lpage>. <pub-id pub-id-type="doi">10.1146/annurev.neuro.24.1.1071</pub-id><pub-id pub-id-type="pmid">11520928</pub-id></citation>
</ref>
</ref-list>
<fn-group>
<fn id="fn0001"><p><sup>1</sup><ext-link ext-link-type="uri" xlink:href="https://bitbucket.org/3dome/spines">https://bitbucket.org/3dome/spines</ext-link></p></fn>
<fn id="fn0002"><p><sup>2</sup>Even under ideal experimental conditions, variation among the spines is still present; thus, we choose to standardize them. This practice allows us to start with more homogeneous data and to reveal subtle differences.</p></fn>
<fn id="fn0003"><p><sup>3</sup>The null hypothesis is that the means are equal, and the alternative is that the means are different.</p></fn>
<fn id="fn0004"><p><sup>4</sup>Each feature is normalized by subtracting the mean and dividing by the standard deviation, both calculated based on the feature values from both the ACTIVE and CONTROL sets.</p></fn>
<fn id="fn0005"><p><sup>5</sup>Systematic differences between the analyzed populations were observed and it is noted that the implemented statistical normalization could cause certain biases.</p></fn>
<fn id="fn0006"><p><sup>6</sup>We tried various different numbers of spines (100, 200, 300, 400) and concluded that 300 is the largest which satisfies the desired condition for assessing similarity between different spines.</p></fn>
</fn-group>
</back>
</article>