2015-01-17 85 views
1

e1071的SVM成本似乎與svmlight的成本不同。 e1071庫的使用手冊對其成本參數說明如下定義:如何通過svmlight提供平衡訓練數據集的平衡訓練成本?

cost of constraints violation (default: 1)—it is the ‘C’-constant of the regular- 
ization term in the Lagrange formulation 

這基本上是未命中分類的允許範圍。存在由svmlight提供,其手冊中所描述的一個重量:

Cost: cost-factor, by which training errors on 
     positive examples outweight errors on negative 
     examples (default 1) 

該成本基本上是允許的情況下,平衡列車數據不具有正的和負的數據點數目相等。 e1071的SVM實現中有沒有類似的東西?

回答

0

你可能想看看參數:class.weights(在幫助頁面上有解釋)。

最好 大衛

+0

嘿,謝謝大衛!我想你是和e1071的作者和維護者一樣的David Meyer。我真的很想知道誰(以及爲什麼)低估了你的答案 - 這正是我所要求的。 我也很高興,以致以前的downvote被取消。 再次感謝!並歡迎來到Stackoverflow。 –