我有非常好定义的机器学习训练集(只有字符串属性)。
例如:
@relation training_rel
@attribute class {politics,sports}
@attribute text string
@data
politics,'some text about politics over here'
... // a lot of other training instances of class politics
sports,'and now some sports over here'
... // a lot of other
我有下面的表townResources,我在其中存储每个城镇ID的每个资源值。我对大量用户的性能影响有点保留。我正在考虑将资源的余额移到towns表中,并将资源的一般值存储在.php文件中。
在这里,您有了城市资源表:
CREATE TABLE IF NOT EXISTS `townresources` (
`townResourcesId` int(10) NOT NULL AUTO_INCREMENT,
`userId` int(10) NOT NULL,
`resourceId` int(10) NOT NULL,
`townId` int(10) NOT NULL,
load fisheriris;
y = species; %label
X = meas;
%Create a random partition for a stratified 10-fold cross-validation.
c = cvpartition(y,'KFold',10);
% split training/testing sets
[trainIdx testIdx] = crossvalind('HoldOut', y, 0.6);
crossvalind用于执行交叉验证,通过返回索引,将整个特性集X随机分成训练和测试数据。利用这些