-
Notifications
You must be signed in to change notification settings - Fork 0
Training and Testing Models
SimonLee edited this page Aug 10, 2019
·
2 revisions
-
how well is my model doing? (我的模型表现如何)
-
how do we improve it based on these metrics? (如何根据这些指标改善模型)
-
Problem (问题)
-
Tools (模型)
-
Measurement Tools (评测)
-
Mean (均值/期望)
-
Median (中值)
-
Variance (方差)
import pandas
data = pandas.read_csv("file_name.csv")
-
Logistic Regression (逻辑回归)
-
Neural Networks (神经网络)
-
Decision Trees (决策树)
-
Support Vector Machines (支持向量机)
- 随着参数数量的增加,调参越来越困难
-
Train (训练模型)
-
Test (测试模型)
-
Evaluate (评估模型)
-
Validate (验证模型)
-
Regression (回归)
-
Classification (分类)
-
Testing set make it more general (测试集使模型泛化能力更好)
-
Never use your testing data for training (绝对不要使用测试集训练模型)
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25)