Skip to content

Commit

Permalink
remove eval_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
lihang00 committed Apr 24, 2015
1 parent 0058eba commit c6d2e16
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions wrapper/xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,14 +777,12 @@ class XGBModel(BaseEstimator):
base_score:
The initial prediction score of all instances, global bias.
eval_metric : string
Evaluation metrics for validation data.
seed : int
Random number seed.
"""
def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective="reg:linear",
nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1,
base_score=0.5, eval_metric='error', seed=0):
base_score=0.5, seed=0):
if not SKLEARN_INSTALLED:
raise Exception('sklearn needs to be installed in order to use this module')
self.max_depth = max_depth
Expand All @@ -801,7 +799,6 @@ def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100, silent=True
self.colsample_bytree = colsample_bytree

self.base_score = base_score
self.eval_metric = eval_metric
self.seed = seed

self._Booster = Booster()
Expand All @@ -828,10 +825,10 @@ def predict(self, X):
class XGBClassifier(XGBModel, ClassifierMixin):
def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective="binary:logistic",
nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1,
base_score=0.5, eval_metric='error', seed=0):
base_score=0.5, seed=0):
super(XGBClassifier, self).__init__(max_depth, learning_rate, n_estimators, silent, objective,
nthread, gamma, min_child_weight, max_delta_step, subsample, colsample_bytree,
base_score, eval_metric, seed)
base_score, seed)

def fit(self, X, y, sample_weight=None):
y_values = list(np.unique(y))
Expand Down

0 comments on commit c6d2e16

Please sign in to comment.