Notes
I regularly take down notes and paste them on the shields of my desk. When the shields are full, I remove some and transcribe the contents here.
04-09-2017
- The graphical model captures the causal process by which the observed data was generated. For this reason, such models are called generative models.
- Explain away: to dismiss or minimise the significance of something by explanation.
- clique: a small close-knit group of people who do not readily allow others to join them.
- Interquartile range (IQR) = middle 50% = Q3 - Q1
- Point beyond 1.5IQR mild outlier
- Point beyond 3IQR extreme outlier
- 联合熵 joint entropy H(X,Y) = - sum_x sum_y p(x,y)logp(x,y)
- H(X,Y) >= max{H(X),H(Y)}
- H(X,Y) ⇐ H(X) + H(Y)
- H(X,Y) = H(X) + H(Y) if X and Y are independent.
- H(Y|X) = H(X,Y) - H(X)
- Conditional entropy 条件熵
- H(Y|X) entropy of Y conditioned on X
- H(Y|X) = sum_x p(x) H(Y|X=x) = - sum_x,y p(x,y)logp(y|x)
- H(Y|X) = 0 if Y completely determined by X
- H(Y|X) = H(Y) if Y,X are independent
- Mutual information 互信息
- I(X;Y) = H(X) - H(X|Y) = H(Y) - H(Y|X) = H(X) + H(Y) - H(X,Y) = H(X,Y) - H(X|Y) - H(Y|X)
- I(X;Y) = D_KL(p(x,y)||p(x)p(y))
- Gini(X) = 1 - sum p_i^2
- Entropy H(X) = -sum p_i logp_i
- 两者均衡量不确定性,趋势相同,Gini加1保证非负
- H(Y|X) = H(X|Y) + H(Y) - H(X) ←- Bayes' rule
- H(Y|X) ⇐ H(Y)
- H(X,Y) = H(X|Y) + H(Y|X) + I(X;Y)
- H(X,Y) = H(X) + H(Y) - I(X;Y)
- I(X;Y) ⇐ H(X)
- from sklearn.model_selection import train_test_split
- from sklearn.model_selection import cross_val_score
- K-Folds Cross Validation
- Leave One Out Cross Validation
- inherent conflict: degeneracy of the covariance function is good for computational reasons, but bad for modelling reasons.
- VIM 快捷键
- ctrl+d: page down
- ctrl+u: page up
- *: next occurance
- #: prev occurance
- \+: at least once
- shift+Enter 五笔
- dfu-util -a 0 –dfuse-address 0x08000000 -D x.bin
03-08-2017
- logit: logistic probit, coined by J. Berkson in 1944, inverse of logistic function.
- odds: p/(1-p)
- quantile function: inverse of CDF
- Beta distribution: support x\in[0,1], f(x) = 1/B(a,b)*x^(a-1)(1-x)^(b-1)
- E[x] = a/(a+b)
- suitable for random behaviour of percentages and proportions.
- Binary Search Tree: left subtree smaller, right subtree bigger.
- Gini impurity: (G as in Gene) I_G = sum_{i=1}^m p_i(1-p_i) = 1 - \sum p_i^2
- docker exec -it ID bash, run a command (bash) in a running container
- docker run -it image, run a command in a new container, RUN instead of EXEC
- docker ps -l, list containers
- docker commit containerID, create a new image from container's change
- docker run -e DISPLAY=192.168.xx.xx:0 -v /tmp/.X11-unix:/tmp/.X11-unix:rw osrf/ros:kinetic-desktop rqt
- docker images
- docker search
- numpy matrix multiplication, a.dot(b)
- element-wise multiplication, a*b
- comma indicates a tuple should be constructed
- hostname -i, show IP address
12-07-2017
- 假设属性之间相互独立
- Naive Bayes, x = [x_1, \ldots, x_n] feature vector, C_k: class k, p(C_k|x) \prop p(x|C_k)p(C_k).
- By assuming each feature is conditionally independent of every other one given class C_k, then p(x|C_k) = \prod p(x_i|C_k).
- :v/pattern/p, vim find lines not matching a pattern
- sudo iptables -L -n, display firewall status
- which, whereis, locate programs
- NP-Hardness: non-deterministic polynomial-time hard, i.e. at least as hard as the hardest problems in NP.
- ReLU: Rectified linear unit
- if the posterior distribution p(\theta|x) is in the same family as the prior distribution, then the prior and posterior are called conjugate distributions, and the prior is called the conjugate prior for the likelihood function.
25-04-2017
- DELETE FROM table WHERE id BETWEEN 10 and 200
- git remote set-url origin git@github.com:…. if username and password are asked.
- mount -o remount, rw /
- mount -o remount, ro /
- X band, 8-12GHz, 3.75-2.5cm
- sudo dd bs=4M if=/dev/sdb | gzip > pathtoimage.gz
- gzip -dc pathtoimage.gz | sudo dd bs=4M of=/dev/sdb
- sudo dd bs=4M if=/dev/sdb | gzip > pathtoimage.gz
- gzip -dc pathtoimage.gz | sudo dd bs=4M of=/dev/sdb
git remote -v git remote add upstream https:// ....git git fetch upstream git checkout master git merge upstream/master git push origin master
- COMMAND_LONG(#76)
- COMMAND_INT(#75)
- heter- other alter
- laser pulse time-of-flight(TOF)
- AP6212 = STM32F205 + BCM43438, 2MB Flash
08-09-2015
- 2693451744
- ss -aut4
- ip.src == 192.168.1.130 and http
- OPPORTUNIST: A person who exploits circumstances to gain immediate advantage rather than being guided by consistent principles or plans.
Use OpenBUGS in R
library(BRugs) writeLines(modelString,con="model.txt") modelCheck( "model.txt" ) modelData(bugsData(list)) modelCompile() modelGenInits() or ModelInits(bugsInits(initfunc())) samplesSet(c("","")) modelUpdate(burnin) samplesSample("") samplesStats("")
top
- a - PID
- c - absolute path
- P - CPU
- M - memory
Two modifications of the PIXHAWK code
- /src/modules/px4iofirmware/safety.c safety_button_pressed = 1
- commander.c line 1338 if updated safety.safety_switch_available = false
set root=(hd0,7) linux /vmlinuz-linux root=/dev/sda5 initrd /boot /initramfs-linux.img boot