标签:环境 模型 cat clu sel selected str 训练 ext
```
//训练集x(N * d), y(N * 1); 测试集x, y(同分布的)
train_x, train_y, test_x, test_y = getData() // MNIST
model = somemodel() // SVM(),LASSO()
model.fit(train_x, train_y) // 学习参数
predictions = model.predict(test_x) // 预测模型
//验证模型
//分类任务: 分对的百分比
//回归任务: 计算MSE等
//11种评价指标
//一个预测的数,和真实数据之间的差距
score = score_function(test_y, predictions)
```
标签:环境 模型 cat clu sel selected str 训练 ext
原文地址:http://www.cnblogs.com/douzujun/p/7730301.html