test_X, test_y = train[test_index], labels[test_index]

################################################################################


## list of prediction results from different classifiers 
predictions = []


#############################
##  XGBoost Classifier
#############################

xgb_param = param.xgboost_para()

xgboost_clf = clf.xgboost_classifer(xgb_param, train_X, train_y);

## xgboost input data requires specifc format
xg_test = xgb.DMatrix(test_X, label=test_y)
## prediction from xgboost
y_prob = xgboost_clf.predict(xg_test)

predictions.append(y_prob)


#############################
## Lasagne NN Classifier
#############################


# standardize the data for NN
Example #2
0
train_X, train_y = train[train_index], labels[train_index]
test_X, test_y = train[test_index], labels[test_index]

################################################################################

## list of prediction results from different classifiers
predictions = []

#############################
##  XGBoost Classifier
#############################

xgb_param = param.xgboost_para()

xgboost_clf = clf.xgboost_classifer(xgb_param, train_X, train_y)

## xgboost input data requires specifc format
xg_test = xgb.DMatrix(test_X, label=test_y)
## prediction from xgboost
y_prob = xgboost_clf.predict(xg_test)

predictions.append(y_prob)

#############################
## Lasagne NN Classifier
#############################

# standardize the data for NN
unlabeled_X = np.concatenate((train_X, test_X), axis=0)
scaler = StandardScaler()