How to to write multi-lined subscript in latex?

In latex, what is the best way to write multi-lined formula in subscript? Use `\atop`! For example, \begin{align*} P(M_n=1) =\sigma(&w_s(\sum\limits_{j_r \in T_{nr}}\vec{U_{j_r}} \cdot \vec{C_{j_r}} – \sum\limits_{j_b \in T_{nb}}\vec{U_{j_b}} \cdot \vec{C_{j_b}} ) + \\ &w_b(\sum\limits_{j_{r_1}, j_{r_2} \in T_{nr} \atop j_{r_1} \neq j_{r_2} }\left\Vert\vec{C_{j_{r_1}}} – \vec{C_{j_{r_2}}}\right\Vert^2 – \sum\limits_{j_{b_1}, j_{b_2} \in T_{nb} \atop j_{b_1} \neq j_{b_2} }\left\Vert\vec{C_{j_{b_1}}} – …

How to write multi-lined formula?

In latex, what is the best way to write multi-lined formula? Actually, the `begin/end{align*}` block supports `\\\` in it. For example, \begin{align*} P(M_n=1) =\sigma(&w_s(\sum\limits_{j_r \in T_{nr}}\vec{U_{j_r}} \cdot \vec{C_{j_r}} – \sum\limits_{j_b \in T_{nb}}\vec{U_{j_b}} \cdot \vec{C_{j_b}} ) + \\ &w_b(\sum\limits_{j_{r_1}, j_{r_2} \in T_{nr} \atop j_{r_1} \neq j_{r_2} }\left\Vert\vec{C_{j_{r_1}}} – \vec{C_{j_{r_2}}}\right\Vert^2 – \sum\limits_{j_{b_1}, j_{b_2} \in T_{nb} \atop j_{b_1} …

Minimum Description Length (MDL): a scoring function to learn Bayesian Network Structure

Bayesian Network Augmented Naive-Bayes (BAN) is an improved version of Naive-Bayes, in which every attribute may have at most one other attribute as its parent other than the class variable . For example (figure from [1]): Though BAN provides a more flexible structure compared to Naive Bayes, the structure (i.e., dependence/independence relationships between attributes) needs …

A viewer for Python Dict

Just found a beautiful viewer library that helps you view Python Dict object. Here is the code: “”” Created on Fri Feb 22 12:52:28 2013 @author: kranzth “”” from traits.api \ import HasTraits, Instance, Str, on_trait_change from traitsui.api \ import View, VGroup, Item, ValueEditor, TextEditor from copy import deepcopy class DictEditor(HasTraits): SearchTerm = Str() Object …

How to run a PPTP VPN server?

Setting up a VPN using PPTP protocal can be vulnerable for security. Yet it is an easy and quick way to set up a virtual private network (VPN). The procedure to setup up a PPTP VPN server can be found here:  https://help.ubuntu.com/community/PPTPServer The way to connect to a PPTP server on a client machine can …

Change mongodb data path to portable hard drive

Background I have a 1TB portable usb hard drive which I want to host mongodb data. The OS is ubuntu 15.04   Procedure stop your mongodb service sudo service mongod stop   edit `/etc/fstab` so that the computer automatically mounts your portable drive under “mongodb” user everytime the OS boots up: UUID=018483db-1b1c-4dd2-a373-58a6aa5a10be / ext4 errors=remount-ro …

Create mongodb replica sets on different machines

Important prerequisites: Confirm connectivity between machines you want to set as replica set Confirm the same version of Mongodb is installed on each machine. I tried one with mongo 2.6 and another with mongo 3.0 and totally failed. Then I installed mongo 3.0 on every machine. Don’t set authentication for all the machines before you …

Install Latex distribution, editor and packages on Ubuntu

1. Install TexLive. This is the latex environment. https://www.tug.org/texlive/quickinstall.html We recommend to use .install-tl script to install TexLive. TexLive is usually installed at “/usr/local/texlive/year/bin/x86_64-linux/….” Although you can install vanilla TexLive via sudo apt-get install texlive, we often observe it misses advanced accessories such as fonts.   2. Install Texmaker http://www.xm1math.net/texmaker/ *** Note: On Ubuntu, Texmaker can …