_just record in case of something_
Notes in Machine Learning with Python(3)
Notes in Machine Learning with Python(3)
Environment Problem
- numpy and scipy
- normal ones:pip install pandas quandl sklearn numpy matplotlib
- pythonprogramming.net
- github
Kernels
change the linearly inseparable data into a linearly separable data
Why Kernels
1 | K(x ,x') = z.z' //The Kernel function |
Soft Margin SVM
google: svm kernel visualization overlapping —> softmax polynomial kernel
SVM Parameters
multi-classes
- OVR : one vs rest
- OVO : one vs one
- sklearn.svm.svc
- decision_function_shape(default = ‘ovr’)
Common Sense - Republic
Common Sense - Republic
Julius Caesar Excerpts
_I have, when you have heard what I can say:/And know it now: the senate have concluded/To give this day a crown to mighty Caesar./If you shall send them word you will not come,/Their minds may change. Besides, it were a mock/Apt to be render’d, for some one to say/’Break up the senate till another time,/When Caesar’s wife shall meet with better dreams.’/If Caesar hide himself, shall they not whisper/’Lo, Caesar is afraid’?/Pardon me, Caesar; for my dear dear love/To our proceeding bids me tell you this;/And reason to my love is liable._ —— from Shakespeare’s tragedy
《朱利乌斯·凯撒》
《凯撒大帝》(英语:The Tragedy of Julius Caesar,直译为《朱利叶斯·凯撒》)是莎士比亚的其中一出悲剧,通常被认定为是在1599年完成的。故事描述公元前44年一众罗马元老计划并成功刺杀独裁官朱利叶斯·凯撒,以及叛徒们在腓力比被击退的经过。莎士比亚有另外两出戏剧也是改编自古罗马历史,即《安东尼与克丽奥佩托拉》及《科利奥兰纳斯》,而《安东尼与克丽奥佩托拉》更可算是此剧的续集。 虽然戏剧的名字是《凯撒大帝》,但有观点认为剧中的主角是马尔卡斯·布鲁塔斯;凯撒只在三场戏中出现。此剧以布鲁图的内心挣扎为主题,描绘他怎样在友谊、国家及荣誉之间犹疑不定。
Notes in Machine Learning with Python(2)
Notes in Machine Learning with Python(2)
Environment Problem
- numpy and scipy
- normal ones:pip install pandas quandl sklearn numpy matplotlib
- pythonprogramming.net
- github
Regression
- python list : xs*ys means every element in xs times ys by the order of index
Matplotlib
plt.scatter()
—-> scatter
Common Sense - Kingdom
Common Sense - Kingdom
Leviathan Excerpts
Nature, the art whereby God hath made and governs the world, is by the art of man, as in many other things, so in this also imitated, that it can make an artificial animal. For seeing life is but a motion of limbs, the beginning whereof is in some principal part within; why may we not say, that all automata (engines that move themselves by springs and wheels as doth a watch) have an artificial life? For what is the heart, but a spring; and the nerves, but so many strings; and the joints, but so many wheels, giving motion to the whole body, such as was intended by the artificer? Art goes yet further, imitating that rational and most excellent work of nature, man. For by art is created that great Leviathan called a Commonwealth,or State… “大自然”,也就是上帝用以创造和治理世界的艺术,也象在许多其他事物上一样,被人的艺术所模仿,从而能够制造出人造的动物。由于生命只是肢体的一种运动,它的起源在于内部的某些主要部分,那么我们为什么不能说,一切象钟表一样用发条和齿轮运行的”自动机械结构”也具有人造的生命呢?是否可以说它们的”心脏”无非就是”发条”、”神经”只是一些”游丝”,而”关节”不过是一些齿轮,这些零件如创造者所意图的那样,使整体得到活动的呢?艺术则更高明一些:它还要模仿有理性的”大自然”最精美的艺术品——“人”。因为号称”国民的整体”或”国家”……
Notes in Machine Learning with Python (1)
Notes in Machine Learning with Python (1)
Environment Problem
- numpy and scipy
- normal ones:pip install pandas quandl sklearn numpy matplotlib
- pythonprogramming.net
- github
Common Sense - Empire
Common Sense - Empire
_Common Sense Excerpts_
Society in every state is a blessing, but government even in its best state is but a necessary evil in its worst state an intolerable one; for when we suffer, or are exposed to the same miseries by a government, which we might expect in a country without government, our calamities is heightened by reflecting that we furnish the means by which we suffer! Government, like dress, is the badge of lost innocence; the palaces of kings are built on the ruins of the bowers of paradise. For were the impulses of conscience clear, uniform, and irresistibly obeyed, man would need no other lawgiver; but that not being the case, he finds it necessary to surrender up a part of his property to furnish means for the protection of the rest; and this he is induced to do by the same prudence which in every other case advises him out of two evils to choose the least. Wherefore, security being the true design and end of government, it unanswerably follows that whatever form thereof appears most likely to ensure it to us, with the least expense and greatest benefit, is preferable to all others.——by Thomas Paine
_托马斯·潘恩_
托马斯·潘恩(Thomas Paine):英裔美国思想家、作家、政治活动家、理论家、革命家、激进民主主义者。生于英国诺福克郡,曾继承父业做过裁缝,后来做过教师、税务官员,后来投身欧美革命运动。1792年他被选入法国国民公会。1802年在杰斐逊总统的邀请下,潘恩返回美国。1809年6月8日在纽约格林尼治村林苑路59号去世,享年72岁。
_Empire_
_Concept of Empire_
_Contrast Concepts_
- geographic:a vast territory — city-state
- cultrial:multicultural — nation-state
- majesty:infinite — kingdom
- inherit:hereditary — republic
- power:superincumbent — federation
Crawler Pictures on microsoft
crawler_pictures
crawler_pictures on http://www.officeplus.cn
To Get my background pictures
- When i see the pictures in the microsoft,i just want to get it!
Game Prediction System Part 2
Game Prediction System Part 2
Data Retrieving
_Data Source and version control_
crawler with Urllib and BS4
- Something just be different with last part’s website,the web page on WAN PLUS has changed,this become a static webpage,so that we can just use bs4 to get what we want
- First Step is to get the different game series’s order. The order is very important,the urls http://www.wanplus.com/event/173.html have different order like 173 and so on,so we must find every series’ order.At the first time i want to find all the orders myself,and i found that it is two much workload. So,i put it to the work to the bs4,as follows:
Game Prediction System Part 1
Game Prediction System Part 1
Data Retrieving
_Data Source and version control_
crawler with PyQt and BS4
BeautifulSoup is just a Web page parser,cannot use for ajax or other dynamic pages,or it is very difficult to achieve it.There is a video on youtube offers an solution. It simulates an browser client to get the dynamic pages,so you can just use BS4 to parse the ajax pages,just as follows:
Code: