def allClassifierPredictions(kidCapsule): decisionTree = DecisionTreeClassifier(max_depth=None, min_samples_split=1, random_state=0) randomForest = RandomForestClassifier(n_estimators=50, max_depth=None, min_samples_split=1, random_state=0) extraTrees = ExtraTreesClassifier(n_estimators=50, max_depth=None, min_samples_split=1, random_state=0) gradientBoost = GradientBoostingClassifier(n_estimators=50, max_depth=1, learn_rate=1.0, random_state=0) decisionTree.compute_importances = True randomForest.compute_importances = True extraTrees.compute_importances = True gradientBoost.compute_importances = True decisionTree.fit(kidCapsule.train_M, kidCapsule.trainLabels) randomForest.fit(kidCapsule.train_M, kidCapsule.trainLabels) extraTrees.fit(kidCapsule.train_M, kidCapsule.trainLabels) gradientBoost.fit(kidCapsule.train_M, kidCapsule.trainLabels) print decisionTree.feature_importances_ print randomForest.feature_importances_ print extraTrees.feature_importances_ print gradientBoost.feature_importances_ dt_pred = decisionTree.predict(kidCapsule.M) rf_pred = randomForest.predict(kidCapsule.M) et_pred = extraTrees.predict(kidCapsule.M) gb_pred = gradientBoost.predict(kidCapsule.M) #import pdb; pdb.set_trace() return dt_pred, rf_pred, et_pred, gb_pred