以下是" svm "
Error in double(nrow(newdata) * object$nclasses * (object$nclasses - 1)/2) :
vector size specified is too large
其中,
data_one [,1] - >是具有1000多个因素的目标类。
因为它有很多因素要分类, svm 算法抛出错误如下,
Dictionary<string, int> lala01 = new Dictionary<string, int>();
lala01.Add("A", 5);
lala01.Add("B", 2);
lala01.Add("C", 8);
Dictionary<string, int> lala02 = new Dictionary<string, int>();
lala02.Add("A", 1);
lala02.Add("B", 9);
lala02.Add("X", 4);
Dictionary<string, int> lala03 = new Dictionary<string, int>();
lala03.Add("A", 7);
lala03.Add("C", 4);
lala03.Add("X", 1);
lala03.Add("Q", 2);
List<Dictionary<string, int>> dictionaries = new List<Dictionary<string, int>>();
dictionaries.Add(lala01);
dictionaries.Add(lala02);
dictionaries.Add(lala03);
var result = dictionaries.SelectMany(dict => dict)
.ToLookup(pair => pair.Key, pair => pair.Value)
.ToDictionary(group => group.Key, group => group.Max());
据我所知, libsvm 适用于多类目标类。有人可以帮我做同样的事吗?