update statistics
This commit is contained in:
parent
7f044e9b5b
commit
2c4e19a3aa
|
@ -13173,7 +13173,7 @@ div#notebook {
|
|||
|
||||
|
||||
<div class="output_subarea output_stream output_stderr output_text">
|
||||
<pre>14:03:52 [I] klustakwik KlustaKwik2 version 0.2.6
|
||||
<pre>14:18:41 [I] klustakwik KlustaKwik2 version 0.2.6
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13335,7 +13335,7 @@ div#notebook {
|
|||
|
||||
|
||||
<div class="output_text output_subarea output_execute_result">
|
||||
<pre><matplotlib.axes._subplots.AxesSubplot at 0x7f1dd5d9ea90></pre>
|
||||
<pre><matplotlib.axes._subplots.AxesSubplot at 0x7fd37b11ed30></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -13361,7 +13361,7 @@ div#notebook {
|
|||
</div>
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
<div class="input">
|
||||
<div class="prompt input_prompt">In [ ]:</div>
|
||||
<div class="prompt input_prompt">In [7]:</div>
|
||||
<div class="inner_cell">
|
||||
<div class="input_area">
|
||||
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">data_loader</span> <span class="o">=</span> <span class="n">dp</span><span class="o">.</span><span class="n">Data</span><span class="p">(</span>
|
||||
|
@ -13378,7 +13378,7 @@ div#notebook {
|
|||
</div>
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
<div class="input">
|
||||
<div class="prompt input_prompt">In [ ]:</div>
|
||||
<div class="prompt input_prompt">In [8]:</div>
|
||||
<div class="inner_cell">
|
||||
<div class="input_area">
|
||||
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">first_row</span> <span class="o">=</span> <span class="n">units</span><span class="p">[</span><span class="n">units</span><span class="p">[</span><span class="s1">'action'</span><span class="p">]</span> <span class="o">==</span> <span class="s1">'1849-060319-3'</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
|
@ -13473,6 +13473,8 @@ div#notebook {
|
|||
|
||||
<span class="n">information_rate</span> <span class="o">=</span> <span class="n">stats</span><span class="o">.</span><span class="n">information_rate</span><span class="p">(</span><span class="n">smooth_high_rate_map</span><span class="p">,</span> <span class="n">prob_dist</span><span class="p">)</span>
|
||||
|
||||
<span class="n">information_spec</span> <span class="o">=</span> <span class="n">stats</span><span class="o">.</span><span class="n">information_specificity</span><span class="p">(</span><span class="n">smooth_high_rate_map</span><span class="p">,</span> <span class="n">prob_dist</span><span class="p">)</span>
|
||||
|
||||
<span class="n">single_spikes</span><span class="p">,</span> <span class="n">bursts</span><span class="p">,</span> <span class="n">bursty_spikes</span> <span class="o">=</span> <span class="n">spikes</span><span class="o">.</span><span class="n">find_bursts</span><span class="p">(</span><span class="n">spike_times</span><span class="p">,</span> <span class="n">threshold</span><span class="o">=</span><span class="mf">0.01</span><span class="p">)</span>
|
||||
<span class="n">burst_event_ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">bursts</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">single_spikes</span><span class="p">)</span> <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">bursts</span><span class="p">))</span>
|
||||
<span class="n">bursty_spike_ratio</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">bursty_spikes</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">bursty_spikes</span><span class="p">)</span> <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">single_spikes</span><span class="p">))</span>
|
||||
|
@ -13500,6 +13502,7 @@ div#notebook {
|
|||
<span class="s1">'gridness'</span><span class="p">:</span> <span class="n">gridness</span><span class="p">,</span>
|
||||
<span class="s1">'border_score'</span><span class="p">:</span> <span class="n">border_score</span><span class="p">,</span>
|
||||
<span class="s1">'information_rate'</span><span class="p">:</span> <span class="n">information_rate</span><span class="p">,</span>
|
||||
<span class="s1">'information_specificity'</span><span class="p">:</span> <span class="n">information_spec</span><span class="p">,</span>
|
||||
<span class="s1">'head_mean_ang'</span><span class="p">:</span> <span class="n">head_mean_ang</span><span class="p">,</span>
|
||||
<span class="s1">'head_mean_vec_len'</span><span class="p">:</span> <span class="n">head_mean_vec_len</span><span class="p">,</span>
|
||||
<span class="s1">'spacing'</span><span class="p">:</span> <span class="n">spacing</span><span class="p">,</span>
|
||||
|
@ -13552,6 +13555,7 @@ bursty_spike_ratio 0.676486
|
|||
gridness -0.459487
|
||||
border_score 0.078474
|
||||
information_rate 0.965845
|
||||
information_specificity 0.309723
|
||||
head_mean_ang 5.788704
|
||||
head_mean_vec_len 0.043321
|
||||
spacing 0.624971
|
||||
|
@ -13593,13 +13597,13 @@ dtype: float64</pre>
|
|||
|
||||
|
||||
|
||||
<div id="2b4825d6-9766-4260-96f8-a8462ab148ed"></div>
|
||||
<div id="c75fbc7b-721e-4d42-9315-b47198e54bff"></div>
|
||||
<div class="output_subarea output_widget_view ">
|
||||
<script type="text/javascript">
|
||||
var element = $('#2b4825d6-9766-4260-96f8-a8462ab148ed');
|
||||
var element = $('#c75fbc7b-721e-4d42-9315-b47198e54bff');
|
||||
</script>
|
||||
<script type="application/vnd.jupyter.widget-view+json">
|
||||
{"model_id": "efa60f02cd1b4f1a946f01a7f61c1640", "version_major": 2, "version_minor": 0}
|
||||
{"model_id": "df0e286d762c4ef3b5a6a00a3b82eee6", "version_major": 2, "version_minor": 0}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
@ -13629,7 +13633,6 @@ var element = $('#2b4825d6-9766-4260-96f8-a8462ab148ed');
|
|||
ret = ret.dtype.type(ret / rcount)
|
||||
/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/quantities/quantity.py:624: RuntimeWarning: Mean of empty slice.
|
||||
ret = self.magnitude.mean(axis, dtype, None if out is None else out.magnitude)
|
||||
/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/ipykernel_launcher.py:82: RuntimeWarning: invalid value encountered in long_scalars
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13711,6 +13714,28 @@ var element = $('#2b4825d6-9766-4260-96f8-a8462ab148ed');
|
|||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
<div class="input">
|
||||
<div class="prompt input_prompt">In [ ]:</div>
|
||||
<div class="inner_cell">
|
||||
<div class="input_area">
|
||||
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">statistics_action</span><span class="o">.</span><span class="n">modules</span><span class="p">[</span><span class="s1">'parameters'</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s1">'max_speed'</span><span class="p">:</span> <span class="n">max_speed</span><span class="p">,</span>
|
||||
<span class="s1">'min_speed'</span><span class="p">:</span> <span class="n">min_speed</span><span class="p">,</span>
|
||||
<span class="s1">'position_sampling_rate'</span><span class="p">:</span> <span class="n">position_sampling_rate</span><span class="p">,</span>
|
||||
<span class="s1">'position_low_pass_frequency'</span><span class="p">:</span> <span class="n">position_low_pass_frequency</span><span class="p">,</span>
|
||||
<span class="s1">'box_size'</span><span class="p">:</span> <span class="n">box_size</span><span class="p">,</span>
|
||||
<span class="s1">'bin_size'</span><span class="p">:</span> <span class="n">bin_size</span><span class="p">,</span>
|
||||
<span class="s1">'smoothing_low'</span><span class="p">:</span> <span class="n">smoothing_low</span><span class="p">,</span>
|
||||
<span class="s1">'smoothing_high'</span><span class="p">:</span> <span class="n">smoothing_high</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="cell border-box-sizing code_cell rendered">
|
||||
<div class="input">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"14:03:52 [I] klustakwik KlustaKwik2 version 0.2.6\n"
|
||||
"14:18:41 [I] klustakwik KlustaKwik2 version 0.2.6\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -175,7 +175,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x7f1dd5d9ea90>"
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x7fd37b11ed30>"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
|
@ -202,7 +202,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -215,7 +215,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -255,6 +255,7 @@
|
|||
"gridness -0.459487\n",
|
||||
"border_score 0.078474\n",
|
||||
"information_rate 0.965845\n",
|
||||
"information_specificity 0.309723\n",
|
||||
"head_mean_ang 5.788704\n",
|
||||
"head_mean_vec_len 0.043321\n",
|
||||
"spacing 0.624971\n",
|
||||
|
@ -345,6 +346,8 @@
|
|||
" border_score = sp.border_score(smooth_high_rate_map, fields_laplace)\n",
|
||||
"\n",
|
||||
" information_rate = stats.information_rate(smooth_high_rate_map, prob_dist)\n",
|
||||
" \n",
|
||||
" information_spec = stats.information_specificity(smooth_high_rate_map, prob_dist)\n",
|
||||
"\n",
|
||||
" single_spikes, bursts, bursty_spikes = spikes.find_bursts(spike_times, threshold=0.01)\n",
|
||||
" burst_event_ratio = np.sum(bursts) / (np.sum(single_spikes) + np.sum(bursts))\n",
|
||||
|
@ -373,6 +376,7 @@
|
|||
" 'gridness': gridness,\n",
|
||||
" 'border_score': border_score,\n",
|
||||
" 'information_rate': information_rate,\n",
|
||||
" 'information_specificity': information_spec,\n",
|
||||
" 'head_mean_ang': head_mean_ang,\n",
|
||||
" 'head_mean_vec_len': head_mean_vec_len,\n",
|
||||
" 'spacing': spacing,\n",
|
||||
|
@ -393,7 +397,7 @@
|
|||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "efa60f02cd1b4f1a946f01a7f61c1640",
|
||||
"model_id": "df0e286d762c4ef3b5a6a00a3b82eee6",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
|
@ -425,8 +429,7 @@
|
|||
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars\n",
|
||||
" ret = ret.dtype.type(ret / rcount)\n",
|
||||
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/quantities/quantity.py:624: RuntimeWarning: Mean of empty slice.\n",
|
||||
" ret = self.magnitude.mean(axis, dtype, None if out is None else out.magnitude)\n",
|
||||
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/ipykernel_launcher.py:82: RuntimeWarning: invalid value encountered in long_scalars\n"
|
||||
" ret = self.magnitude.mean(axis, dtype, None if out is None else out.magnitude)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -490,6 +493,24 @@
|
|||
"copy_tree(output_path, str(statistics_action.data_path()))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"statistics_action.modules['parameters'] = {\n",
|
||||
" 'max_speed': max_speed,\n",
|
||||
" 'min_speed': min_speed,\n",
|
||||
" 'position_sampling_rate': position_sampling_rate,\n",
|
||||
" 'position_low_pass_frequency': position_low_pass_frequency,\n",
|
||||
" 'box_size': box_size,\n",
|
||||
" 'bin_size': bin_size,\n",
|
||||
" 'smoothing_low': smoothing_low,\n",
|
||||
" 'smoothing_high': smoothing_high\n",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue