<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://networks.tir.tw/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://networks.tir.tw/wiki/feed.php">
        <title>Lab Comp Bio Net - technical</title>
        <description></description>
        <link>https://networks.tir.tw/wiki/</link>
        <image rdf:resource="https://networks.tir.tw/wiki/_media/logo.png" />
       <dc:date>2026-05-19T06:28:30+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:finite-entropy-estimate?rev=1669527378&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:ising1d?rev=1667056210&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:losses?rev=1631070598&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:names?rev=1569419049&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:poisson_spike_train?rev=1665381780&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:python?rev=1769435155&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:sliding_window?rev=1634051704&amp;do=diff"/>
                <rdf:li rdf:resource="https://networks.tir.tw/wiki/technical:surprise?rev=1725514669&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://networks.tir.tw/wiki/_media/logo.png">
        <title>Lab Comp Bio Net</title>
        <link>https://networks.tir.tw/wiki/</link>
        <url>https://networks.tir.tw/wiki/_media/logo.png</url>
    </image>
    <item rdf:about="https://networks.tir.tw/wiki/technical:finite-entropy-estimate?rev=1669527378&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-11-27T05:36:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Estimate entropy of a finite discrete system using limited samples</title>
        <link>https://networks.tir.tw/wiki/technical:finite-entropy-estimate?rev=1669527378&amp;do=diff</link>
        <description>Estimate entropy of a finite discrete system using limited samples

Following idea of:

	*  Ma, “Calculation of Entropy from Data of Motion”, Journal of Statistical Physics 26, 221–240 (1981) URL. zotero

Consider a system with a state space of the size $|\mathbb{X}| = \Gamma$\begin{align}
H &amp; = - \sum_{x\in\mathbb{X}} \frac{1}{\Gamma} \ln\frac{1}{\Gamma} \\
&amp; = \ln \Gamma .
\end{align}$\Gamma$$\mathbb{X}$$\delta_{x_i,x_j}$$N$$\Gamma$$x_i=x_j$$P_\mathrm{c} = \Gamma^{-1}$$N(N-1)/2$$N$\begin{equat…</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:ising1d?rev=1667056210&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-10-29T15:10:10+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>One-dimensional Ising model</title>
        <link>https://networks.tir.tw/wiki/technical:ising1d?rev=1667056210&amp;do=diff</link>
        <description>One-dimensional Ising model

The Hamiltonian is defined as
\begin{equation} H = E(\mathbf{s}) \equiv  - J\sum_i s_i s_{i+1} - h\sum_i s_i . \end{equation}
where the state vector is $\mathbf{s}=(s_0,s_1,\ldots,s_{N-1})$ with $s_i = \pm 1$ for $i = 0\ldots N-1$ belonging to the least residue system modulo $N$, i.e., $\mathbb{Z}_N$, and corresponding to the periodic boundary condition.

Partition function

The partition function is defined as
\begin{equation} Z \equiv \sum_{\mathbf{s}} e^{-\beta E(…</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:losses?rev=1631070598&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-08T03:09:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Loss functions</title>
        <link>https://networks.tir.tw/wiki/technical:losses?rev=1631070598&amp;do=diff</link>
        <description>Loss functions

Cross entropy loss

For the results of a classifier, the output is an array of unnormalized scores $x_i$, $i=0\ldots K-1$, for each class. Assuming the target is $i=y$. The cross entropy loss for each sample is given by:
\begin{equation}
l_\text{CE}(\mathbf{x}) = -\ln\frac{e^{x_y}}{\sum_ie^{x_i}} = -x_y+\sum_ie^{x_i}
\end{equation}
while
\begin{equation} L_\text{CE} = \langle l_\text{CE}\rangle \end{equation}
is the average over a given dataset.$x_i$\begin{equation}r = \mathop{\t…</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:names?rev=1569419049&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-09-25T13:44:09+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Naming convention for data</title>
        <link>https://networks.tir.tw/wiki/technical:names?rev=1569419049&amp;do=diff</link>
        <description>Naming convention for data

octal sequencing

For the binary representations in machines, only numbers with fractions denominated by 2&#039;s exponents can be precisely represented with finite number of digits. Among these, octal numbers are closest to the familiar decimal numbers.</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:poisson_spike_train?rev=1665381780&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-10-10T06:03:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Inhomogeneous Poisson spike train generation</title>
        <link>https://networks.tir.tw/wiki/technical:poisson_spike_train?rev=1665381780&amp;do=diff</link>
        <description>Inhomogeneous Poisson spike train generation


def gen_spikes(r,dt,rng):
    &#039;&#039;&#039;Generate spike train from Poisson rate
 
    Parameters
    ----------
    r:   Array of spike rates
    dt:  Time step
    rng: Random number generator
    &#039;&#039;&#039;
    i = 0
    s = 0
    spks = []
    while True:
        s += rng.exponential()
        while s&gt;r[i]*dt:
            s -= r[i]*dt
            i += 1
            if i&gt;=len(r): break
        else:
            spks.append(i*dt+s/r[i])
            continue
     …</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:python?rev=1769435155&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-26T13:45:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Python with jupyter-lab</title>
        <link>https://networks.tir.tw/wiki/technical:python?rev=1769435155&amp;do=diff</link>
        <description>Python with jupyter-lab

Add the conda-forge channel by running:


conda config --add channels conda-forge


Then, install jupyterlab:


conda install jupyterlab


Useful packages:


conda install jupyter-ruff


Create environment for different python version</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:sliding_window?rev=1634051704&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-10-12T15:15:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Sliding window time histogram</title>
        <link>https://networks.tir.tw/wiki/technical:sliding_window?rev=1634051704&amp;do=diff</link>
        <description>Sliding window time histogram

Given the spike time, plot the event rate within a sliding window.


def sliding_window(ts,wsz=10):
    &#039;&#039;&#039;calculate sliding window time histogram
    
    Parameters
    ----------
    ts:  Array of time points
    wsz: Window size
    
    Returns
    -------
    tss:    Array of time points
    rates:  Firing rates at the time points
    &#039;&#039;&#039;
    tw = ts[0]-wsz # initialized with the time when the first event hits the window
    i0 = 0
    i1 = 0
    lt = len(ts)…</description>
    </item>
    <item rdf:about="https://networks.tir.tw/wiki/technical:surprise?rev=1725514669&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-09-05T05:37:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Surprise in prediction of spin given the effective local field</title>
        <link>https://networks.tir.tw/wiki/technical:surprise?rev=1725514669&amp;do=diff</link>
        <description>Surprise in prediction of spin given the effective local field

Consider an event with two possible outcome, + and -. If a prediction of $p_+ = p_\mathrm{p}$ is made, how much surprise will be there when the actual outcome is known?

It should be $-\log_2 p_\mathrm{p}$ if the outcome is + and $-\log_2 \left(1-p_\mathrm{p}\right)$$h^\mathrm{eff}$$T=\beta^{-1}=1$$s$$s=+1$$$ \frac{e^{h^\mathrm{eff}}}{e^{h^\mathrm{eff}}+e^{-h^\mathrm{eff}}} = \frac{1}{2}\left(1+\tanh h^\mathrm{eff}\right). $$$s=-1$$…</description>
    </item>
</rdf:RDF>
