[英]Building prediction model using categorical data in R
我是機器學習的新手,但是,在嘗試建立預測模型時,我所有的訓練集變量都是分類的,
PREDICTOR_1 PREDICTOR_2 PREDICTOR_3
Found : 5 Best Match :2 Found, Supplier site: 5
No result : 2 Found :8 Found, Zone site : 1
Part NotFound:11 Not Found WDA:8 No Data Found :12
PREDICTOR_4 PREDICTOR_5 PREDICTOR_6
No result :11 Found with Different length: 1 High :10
Search begin: 7 No result :16 LOW : 4
Part Found With out Suffix : 1 No result: 4
PREDICTOR_7 PREDICTOR_8 PREDICTOR_9 RESULT
Direct_Match: 8 NO :8 Mpn Found within PCN: 3 Found :15
No result :10 YES :8 Mpn has no PCN :15 Not Found: 3
YES-REMOVE:2
我試圖使用R的glm()函數,但是我一直在
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
1-我想知道是否可以僅使用分類數據來訓練模型
2-這個錯誤是什么意思
1這可能僅在glm模型中使用分類數據
2當一個(或多個)解釋變量與響應變量等於1或-1相關時,會發生此錯誤。我建議您首先刪除相關的exaplanatory變量(與其他解釋變量),並刪除相關性相等的此類解釋變量帶有響應變量的to1或-1。 這可以通過R中的cor
函數完成。我建議針對分類數據的Kendal相關系數。 嘗試cor( data, method = "kendall")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.