Online ML那点事-!
一:譯自wiki:
| ?? KeyWord:標簽反饋; |
Survey:
online machine learning is a model of induction that learns one instance at a time. The goal in on-line learning is to predict labels for instances. For example, the instances could describe the current conditions of thestock market, and an online algorithm predicts tomorrow's value of a particular stock. The key defining characteristic of on-line learning is that soon after the prediction is made, the true label of the instance is discovered. This information can then be used to refine the prediction hypothesis used by the algorithm. The goal of the algorithm is to make predictions that are close to the true labels.
在線機器學習一次學習一個模型。其目標是預測實例的標簽。比如:實例可以形容為股票市場的現狀,在線學習算法預測特定條件下股票明天的值;在線學習的關鍵特征是在預測被確定不就之后,實例被貼上標簽。這種信息可以用來更行算法的參數假設。算法的目標是盡可能的使預測貼近真實標簽;(用標簽實例來更新模型?只更新模型的少量參數,而不必重新訓練整個模型)。
More formally, an online algorithm proceeds in a sequence of trials. Each trial can be decomposed into three steps. First the algorithm receives an instance. Second the algorithm predicts the label of the instance. Third the algorithm receives the true label of the instance.[1] The third stage is the most crucial as the algorithm can use this label feedback to update its hypothesis for future trials.???? The goal of the algorithm is to minimize some performance criteria. For example, with stock market prediction the algorithm may attempt to minimize sum of the square distances between the predicted and true value of a stock. Another popular performance criterion is to minimize the number of mistakes when dealing with classification problems. In addition to applications of a sequential nature, online learning algorithms are also relevant in applications with huge amounts of data such that traditional learning approaches that use the entire data set in aggregate are computationally infeasible.
更一般化的說,在線學習算法有一些列方法,每種方法都可分解為以下幾步:首先,算法接受一個實例;接著算法預測實例的標簽;第三 算法接受實例的真實標簽(有正確和錯誤之分,根據結果來調整算法)。第三步比較重要,因為算法根據標簽反饋來更新算法參數,來更新未來試驗預測的假設。? 算法的目的是最小化某些性能標準(?)。例如,在股票市場,算法嘗試最小化股票預測和現實股票真實值的偏差(整個模型是動態的)。可以用來處理那些數據量太大而計算能力不能一次性處理整個訓練集的情況。(有沒有覺得像人的學習過程,一個一個,而不是簡單背規則,然后錯了就錯了)
Because on-line learning algorithms continually receive label feedback, the algorithms are able to adapt and learn in difficult situations. Many online algorithms can give strong guarantees on performance even when the instances are not generated by a distribution. As long as a reasonably good classifier exists, the online algorithm will learn to predict correct labels. This good classifier must come from a previously determined set that depends on the algorithm. For example, two popular on-line algorithmsperceptron and winnow can perform well when a hyperplane exists that splits the data into two categories. These algorithms can even be modified to do provably well even if the hyperplane is allowed to infrequently change during the on-line learning trials.
因為算法不斷的接受標簽反饋,算法可以適應困難條件下的學習。許多在線學習算法可以在實例由于干擾而沒有被生成的時也有良好表現。一旦良好的分類器被建立,算法感知器可以預測正確標簽。算法必須依賴于已存的良好算法。比如現存的兩個流行算法感知器和winnow在一個二分類超平面存在時可以表現良好。這些算法甚至可以在分裂反饋之后被修改。
Unfortunately, the main difficulty of on-line learning is also a result of the requirement for continual label feedback. For many problems it is not possible to guarantee that accurate label feedback will be available in the near future. For example, when designing a system that learns how to do optical character recognition, typically some expert must label previous instances to help train the algorithm. In actual use of the OCR application, the expert is no longer available and no inexpensive outside source of accurate labels is available. Fortunately, there is a large class of problems where label feedback is always available. For any problem that consists of predicting the future, an on-line learning algorithm just needs to wait for the label to become available. This is true in our previous example of stock market prediction and many other problems.
在線學習的主要困難是不斷的接受標簽反饋。對于很多問題,它不能保證精確的標簽反饋在不就之后被獲得,當設計一個光學字符識別系統,一些專家必須保提前標簽一些實例訓練算法。標簽的獲得是困難的,也許在將來,我們的在線學習算法只需要等待足量的標簽。
一個典型的在線監督學習算法:A prototypical online supervised learning algorithm
In the setting of supervised learning, or learning from examples, we are interested in learning a function, where is thought of as a space of inputs and as a space of outputs, that predicts well on instances that are drawn from a joint probability distribution on. In this setting, we are given aloss function , such that measures the difference between the predicted value and the true value. The ideal goal is to select a function, where is a space of functions called a hypothesis space, so as to minimize the expected risk:
In reality, the learner never knows the true distribution over instances. Instead, the learner usually has access to a training set of examples that are assumed to have been drawni.i.d. from the true distribution. A common paradigm in this situation is to estimate a function throughempirical risk minimization or regularized empirical risk minimization (usuallyTikhonov regularization). The choice of loss function here gives rise to several well-known learning algorithms such as regularizedleast squares andsupport vector machines.
The above paradigm is not well-suited to the online learning setting though, as it requires complete a priori knowledge of the entire training set. In the pure online learning approach, the learning algorithm should update a sequence of functions in a way such that the function depends only on the previous function and the next data point. This approach has low memory requirements in the sense that it only requires storage of a representation of the current function and the next data point. A related approach that has larger memory requirements allows to depend on and all previous data points. We focus solely on the former approach here, and we consider both the case where the data is coming from an infinite stream and the case where the data is coming from a finite training set, in which case the online learning algorithm may make multiple passes through the data.
總結:放個圖,估計不會遭到批判:
二:在線機器學習算法及其偽代碼
原文鏈接:http://blog.csdn.net/viewcode/article/details/9029043
機器學習:需要從已知的數據 學習出需要的模型;
在線算法:需要及時處理收集的數據,并給出預測或建議結果,并根據標簽反饋,更新模型。
通用的在線學習算法步驟如下:
1. 收集和學習現有的數據;
2. 依據模型或規則,做出決策,給出結果;
3. 根據真實的結果,來訓練和學習規則或模型。
常用的在線學習算法:
Perceptron: 感知器
PA: passive Perceptron
PA-I
PA-II
Voted Perceptron
confidence-weighted linear linear classification: 基于置信度加權的線性分類器
Weight Majority algorithm
AROW:adaptive regularization of weighted vector :加權向量的自適應正則化
"NHERD":Normal Herd? 正態解群
一些算法偽代碼,代碼然后配上語言描述,就清晰多了.
感知器Perceptron:
線性分類器,是一個利用超平面來進行二分類的分類器,每次利用新的數據實例,預測,比對,更新,來調整超平面的位置。
相對于SVM,感知器不要每類數據與分類面的間隔最大化。
平均感知器Average Perceptron:
線性分類器,其學習的過程,與Perceptron感知器的基本相同,只不過,它將所有的訓練過程中的權值都保留下來,然后,求均值。
優點:克服由于學習速率過大,所引起的訓練過程中出現的震蕩現象。即超平面圍著一個中心,忽左忽右之類...
Passive Aggressive Perceptron:?
修正權值時,增加了一個參數Tt,預測正確時,不需要調整權值,預測錯誤時,主動調整權值。并可以加入松弛變量的概念,形成其算法的變種。
優點:能減少錯誤分類的數目,而且適用于不可分的噪聲情況。
Tt 有三種計算方法:
a. Tt = ?lt / (||Xt||^2)
b. Tt = ?min{C, lt / ||Xt||^2}?
c. ?Tt = ?lt / (||Xt||^2 + 1/(2C))
分別對應PA, PA-I, PA-II 算法,三種類型。
Voted Perceptron:
存儲和使用所有的錯誤的預測向量。
優點:實現對高維數據的分類,克服訓練過程中的震蕩,訓練時間比SVM要好。
缺點:不能保證收斂.
Confidence Weight:(線性分類器)
每個學習參數都有個信任度(概率),信任度小的參數更應該學習,所以會得到更頻繁的修改機會。信任度,用參數向量的高斯分布表示。
權值w符合高斯分布N(u, 離差陣),而 由w*x的結果,可以預測其分類的結果。
并對高斯分布(的參數)進行更新。
這種方法能提供分類的準確性,并加快學習速度。其理論依據在在于算法正確的預測概率不小于高斯分布的一個值。
AROW: adaptive regularition of weighted vector
具有的屬性:大間隔訓練large margin training,置信度權值confidence weight,處理不可分數據(噪聲)non-separable
相對于SOP(second of Perceptron),PA, CW, 在噪聲情況下,其效果會更好.
Normal herding: (線性分類器)
NHerd算法在計算全協方差陣和對角協方差陣時,比AROW更加的積極。
Weight Majority:?
每個維度都可以作為一個分類器,進行預測;然后,依據權值,綜合所有結果,給出一個最終的預測。
依據最終的預測和實際測量結果,調整各個維度的權值,即更新模型。
易于實施,錯誤界比較小,可推導。
Voted Perceptron:
存儲和使用所有的錯誤的預測向量。
優點:實現對高維數據的分類,克服訓練過程中的震蕩,訓練時間比SVM要好。
缺點:不能保證收斂
以上Perceptron, PA, CW, AROW, NHerd都是Jubatus分布式在線機器學習 框架能提供的算法。
Jubatus與Mahout的異同?
兩者都是針對分布式處理的機器學習算法庫,有較強的伸縮性和運行在普通的硬件上。
但Mahout由于mapreduce的架構,對一些比較復雜的機器學習算法還無法及時支持,且對于實時在線處理數據流也支持比較弱。
Jubatus偏重于在線處理方式,具有較高吞吐量和低延遲的特點,這與Jubatus模型的同步和共享能力相關,并且Jubatus是將數據都是在內存中進行處理分析的。
http://en.wikipedia.org/wiki/Jubatus
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎
總結
以上是生活随笔為你收集整理的Online ML那点事-!的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 开心蛇怎么打不开
- 下一篇: 高位放量下跌是什么意思