[英]How to handle Naive Bayes Classifier when keywords are not present in training set
[英]How present pairs of inputs for binary classifier?
我有一些有關視頻游戲的數據。
數據:
匹配具有matchId。 每場比賽包括兩支隊伍,每支隊伍的大小各不相同。 例如3v3、4v4、5v5,...數據簡化如下:
matchId playerId teamId victory
100 200 14 1
100 201 14 1
100 212 14 1
100 220 14 1
100 202 15 0
100 206 15 0
100 214 15 0
100 217 15 0
任務:
我喜歡在Scikit中使用二進制分類器來根據玩家的特征預測勝利值(0/1)。
問題:
一種方法是將所有player_ids multiplied with 2
的稀疏向量 player_ids multiplied with 2
(2個團隊),其中所選擇的一個以非零值表示,例如1。
如果有N players 0, ..., N-1
,並且team A consists of 1, 3, 5
, team B consists of 0, 2, 4
,則輸入如下所示:
x_sample_0 = [0, 1, 0, 1, 0, 1, 0, ...N-1, 1, 0, 1, 0, 1, ...]
...team A... ... team B...
這應該是任務的非常有力的表示 (就表示的信息而言),有兩個明顯的缺點 :
編輯:
另一種選擇:
f_0 = team of 0, 2, 4
),並使用此表示形式,該表示形式根據統計數據具有不同的向量大小
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.