Bagging

The goal of bagging is to avoid overfitting (high variance). Instead of training one model, we can bootstrap the dataset for the training of multiple models. Then, the output will simply be the average (for regression) or the majority vote (for classification) of the outputs evaluated by the trained models . There are at least…

Transductive inference

Came across a presentation that mentioned transductive learning (in contrast to inductive learning). I didn’t know this terminology before. Wiki gave a very good introduction. The term was coined by Vapnik in the 90s, where he believes transductive is better. The original term came from psychology. Inductive reasoning came from logic, while transductive reasoning came…

我係香港人,我講廣東話

//我係香港人,我講廣東話// 轉貼: 前陣子在廣州一個飯局認識了一個四川音樂學院畢業的湖北女子。 閒聊間,我問她:妳來廣州都 5 年了,怎麼一句廣東話都不會說? 她:身邊沒朋友說粵語,而且粵語也沒什麼好學的。 我問:此話怎說? 她說:大家都講普通話就好了,像粵語這種比較沒文化的方言,都快被邊緣化了,學它幹啥呀?學來有啥用呀!…… 作爲一個講了幾十年粵語又叫讀過下書的香港人,我對她說的當然是不以爲然。 我問:言下之意,你是覺得說普通話比粵語有文化有內涵? 她說:可以這麼說! 我笑著說:很好很好,作爲中原地區的中國人,你熱愛中國的文化麼? 她:當然熱愛了! 我:那你認爲琴棋書畫、四書五經、唐詩宋詞… 這些能代表中國的優秀文化麼? 她:可以。 我:你剛說你熱愛中國文化,那你瞭解唐詩宋詞麼? 她:一點點。 我:那你能隨便諗幾首唐詩宋詞出來聽聽麼? 她:其實我也不太瞭解,但我是有聽說過唐詩宋詞,我大概知道是什麼回事。 我笑說:好吧,我知你應該是跟絕大多數人一樣不瞭解的,不然你又怎會不知道距今已有1300年歷史的唐詩宋詞;其實大多數是用現今的所謂粵語寫成,用粵語才能讀得通順的呢? 她:嚇? 不是吧! 唐詩宋詞那些不是用普通話來諗的麼? 我笑說:1300年的唐代根本就還未出現現在所謂普通話,普通話是大概 500年前北方蒙滿胡語雜交變種流傳至今的語言,不管詞彙、用詞、都比歷史久遠的廣東話單薄粗疏多了。如果你說熱愛中國的文化不是對人吹水唬弄的話,你就應該學好廣東話,不然你看很多古籍和諗唐詩宋詞就會看不懂讀不通。明白了麼? 蘇軾:「寧可食無肉,不可居無竹,無肉令人瘦,無竹令人俗,人瘦尚可肥,士俗不可醫」的【食】字和【肥】字,正是廣東話。日常例子如~食餸、食嘢、好好食、肥仔、肥佬、肥騰騰。普通話唔係用「食」,係用「吃」,唔係用「肥」,係用「胖」。 李白:「人生得意需盡歡,莫使金樽空對月」的【樽】字,正是廣東話。日常例子如~買一樽豉油返屋企、飮番樽啤酒先、呢個玻璃樽入面係乜嘢來咖?普通話唔係用「樽」,係用「瓶」,一瓶、瓶子。 詩経:「行行重行行,與君生別離」的【行】字,正是廣東話。行行重行行的意思是;行下,停下,再行下,又再停下,非常之依依不捨……廣東話日常例子如~行路、行街睇戲、行出去、行花市、行咗幾遠呀?普通話係用「走」或「逛」,走路、逛街。 杜甫:「朱門酒肉臭,路有凍死骨」的【凍死】,正是廣東話。廣東話日常例子如~好凍、凍冰冰。普通話唔係用「凍」係用「冷」。 李白:「舉頭望明月,低頭思故鄉」的【望】字,正是廣東話。廣東話日常例子如~望住前面、唔好四圍望、望乜嘢?普通話唔係用「望」係用「看」。 杜甫:「肯與鄰翁相對飲,隔籬呼取盡餘杯」的【隔籬】,正是廣東話。廣東話日常例子如~我就住喺你隔籬、隔籬鄰舍、搬過隔籬屋。普通話唔係用「隔籬」係用「隔壁」或「鄰居」。 李煜的「問君能有幾多愁?恰似一江春水向東流」的【幾多】,正是廣東話。廣東話日常例子如~幾多錢?幾多個?普通話唔係用「幾多」係用「多少」。 還有太多太例子,不多說了,有興趣自己去查找答案吧! 粵語,有著千幾年深厚歷史文化基礎,係傳承中華古代文明的載體,推普冇問題,但倡議廢粵、貶粵、打壓粵語;絕對是破壞中華文化傳承的文盲行爲。還有,唐詩真係要用粵語來讀先至啱。 以上是有力證據去保衞廣東話! 「聯合國正式定義粵語爲一種語言,此乃全球近1億2千萬粵人的大囍事! 在所有華語中只有 粵語和普通話 被聯合國承認定義爲語言!!! 聯合國正式定義粵語爲一種語言(Language),而不再被稱爲方言 (Dialect),並且認定爲日常生活中主要運用的六種語言 (Leading Languages in daily use) 之一。English (英語)Chinese (中國普通話)Cantonese (粵語)Russian (俄語)French (法語)Spanish (西班牙語)Arabic…

Multi-armed bandits

I always forgot which problem multi-armed bandits actually refer to. I vagulely recalled the one-armed bandit as the slot machine. But I often was confused about that. As a non-native speaker, I first learned the word bandit from playing RPG games as a kid. When I learned that a slot machine can also be referred…

Motivating MCMC

Maybe it is my communications background, it took me long time to really “understand” why we need MCMC. Consider a really simple inference problem of trying to recover state from data , in Bayesian inference, we try to compute the posterior distribution In all textbooks, it will just explain that the denominator is hard to…

Markov chain terminology

I like to view Markov chain as simply state transition model. Let’s consider finite number of states to make thing simple. Time homogeneous: simply mean that the state transition matrix does not change over time Irreducible: I hate this term as I tend to forget what it really means. Model is irreducible if one can…

Frobenius norm, trace norm and other matrix norms

I usually remember what Frobenius norm is. That is, the sum of square of all elements in a matrix. And I sometimes remember what nuclear norm is. That is, the sum of singular values of a matrix. But I forgot what trace norm is when I came across it again today. Actually all of them…

Fixing Yamaha P80 keyboard

I have sticky keys on my P80. I check the most serious one and it appears to be broken as some others suggested. I initially just tried to glue the broken piece together but it doesn’t solve the sticky issue completely. I eventually tried the needle method described in this blog post and webpage. I…

Mixin

Mixin is an incomplete class that can be mixed into multiple classes. For example, mixin Fluttering { void flutter() { print(‘fluttering’); } } abstract class Bird with Fluttering { void chirp() { print(‘chirp chirp’); } } Note that the Fluttering mixin can be used in multiple classes. If we want to restrict the mixin to…

Cannot locate adb starting Android emulator in Android Studio

I got this obscure problem and couldn’t resolve it no matter what I tried. It turns out it simply was because I was running virtualbox on another desktop and I wasn’t aware of that. The error is totally misleading. I was using Ubuntu 16.04. After I shut down the other virtual machine, Android emulator started…