88 Commits

Author SHA1 Message Date
sinhrks
8fc2456c87 Enable flake8 2016-04-24 17:32:31 +09:00
zyxue
79b35da308 improved docstring for folds in cv function 2016-04-09 10:21:56 -07:00
tqchen
ecb3a271be [PYTHON-DIST] Distributed xgboost python training API. 2016-02-29 16:54:13 -08:00
tqchen
4a16b729fc [PYTHON] Simplify training logic, update rabit lib 2016-02-28 13:20:55 -08:00
ivallesp
c17d0ef560 changed the param show_progress by verbose_eval in cv and aggcv functions 2016-02-21 01:28:55 +01:00
Faron
4b3a053913 stratified cv for python wrapper
finalize docstring
2016-02-15 16:06:17 +01:00
FrozenFingerz
2a46918c66 python cv bugfixing
- fixed bug if both eval_metrics xgb-param and
metrics param of cv function have been set
- cv early stopping output looks now like the one of xgb.train
2015-12-29 12:24:38 +01:00
FrozenFingerz
38b773d80b cv: fixed devision by zero exception
- show_progress=False or show_progress=0 led to devision by zero exception
2015-12-27 13:54:52 +01:00
Faron
b3f3e7d0cb fixed wrong iter when using training continuation 2015-12-19 10:35:16 +01:00
Randy Carnevale
380e54a753 docstring typo 2015-12-16 17:25:55 -05:00
Randy Carnevale
0825ab36f0 updating docs for cv 2015-12-16 17:21:23 -05:00
Randy Carnevale
a3fe14d6c6 modifying cv show_progress to allow print-every-n behavior 2015-12-16 16:33:01 -05:00
Far0n
af166bf0a0 small verbose_eval fixes
- ensures same behavior for verbose_eval=0 and verbose_eval=False
- fix printing last eval message if early_stopping_rounds is set, but xgb
  runs to the end
2015-11-24 09:22:25 +01:00
Johan Manders
e68e9659ab Python verbose_eval extension
This is an extension of the verbose_eval abilities.

Removed some trailing-whitespaces
2015-11-13 08:19:44 +01:00
Yuan (Terry) Tang
4fb6153eed Fixed minor lint issue 2015-11-12 09:01:05 -06:00
Yuan (Terry) Tang
0a0951ba12 Clarification for best_ntree_limit 2015-11-12 08:53:45 -06:00
Far0n
ce5930c365 best_ntree_limit attribute added
- best_ntree_limit as new booster atrribute added
- usage of bst.best_ntree_limit in python doc added
- fixed wrong 'best_iteration' after training continuation
2015-11-10 15:37:22 +01:00
antonymayi
7114d6681a Update training.py
pylint compliancy
2015-11-09 15:09:14 +01:00
antonymayi
34e01642ca Update training.py
avoid dict comprehension for python 2.6 compatibility
2015-11-09 14:26:16 +01:00
Yuan (Terry) Tang
b8bc85b534 Clarification for learning_rates 2015-11-08 21:10:04 -06:00
Faron
b2f98db74e grammar correction 2015-11-08 21:00:16 +01:00
Yuan (Terry) Tang
01053f8f2f Merge pull request #594 from Far0n/feval
python: multiple eval_metrics changes
2015-11-08 10:10:28 -05:00
FrozenFingerz
b59018aa05 python: multiple eval_metrics changes
- allows feval to return a list of tuples (name, error/score value)
- changed behavior for multiple eval_metrics in conjunction with
early_stopping: Instead of raising an error, the last passed evel_metric
(or last entry in return value of feval) is used for early stopping
- allows list of eval_metrics in dict-typed params
- unittest for new features / behavior

documentation updated

- example for assigning a list to 'eval_metric'
- note about early stopping on last passed eval metric

- info msg for used eval metric added
2015-11-08 11:23:54 +01:00
Faron
95cc900b1f early stopping for CV (python) 2015-11-07 09:52:36 +01:00
Far0n
b894f7c9d6 bugfix type-check xgb_model param 2015-11-03 14:43:08 +01:00
Faron
4fe2f2fb09 python train additions
+ training continuation of existing model
+ maximize parameter just like in R package (whether  to maximize feval)
2015-11-02 21:21:05 +01:00
terrytangyuan
610b70b79e Suppress more evaluation verbose during training 2015-10-31 13:05:52 -04:00
terrytangyuan
15a0d27eed Fixed bug in eta decay (+2 squashed commits)
Squashed commits:
[b67caf2] Fix build
[365ceaa] Fixed bug in eta decay
2015-10-31 12:54:27 -04:00
Faron
68c9252ff7 fixed "Exactly one space required after comma" 2015-10-25 10:20:00 +01:00
Faron
a1ba608641 learning_rates per boosting round 2015-10-25 10:00:20 +01:00
Takahisa Shimoda
b587dd2704 fix training.py for evals_result in python3 2015-10-23 05:37:13 +09:00
Johan Manders
0f8f8e05b2 One line was too long 2015-10-14 14:18:31 +02:00
Johan Manders
9c8420a4dc Updated the documentation a bit
Will upload some demos for guide-python later.
2015-10-14 12:53:42 +02:00
quansie
b758a13813 Removed extra spaces 2015-10-12 14:26:23 +02:00
quansie
1ca737ed55 Update training.py
Made changes to training.py to make sure all eval_metric information get passed to evals_result. Previous version lost and mislabeled data in evals_result when using more than one eval_metric.

Structure of eval_metric is now:
eval_metric[evals][eval_metric] = list of metrics

Example:

>>> dtrain = xgb.DMatrix('agaricus.txt.train', silent=True)
>>> dtest = xgb.DMatrix('agaricus.txt.test', silent=True)

>>> param = [('max_depth', 2), ('objective', 'binary:logistic'), ('bst:eta', 0.01), ('eval_metric', 'logloss'), ('eval_metric', 'error')]

>>> watchlist  = [(dtest,'eval'), (dtrain,'train')]
>>> num_round = 3
>>> evals_result = {}
>>> bst = xgb.train(param, dtrain, num_round, watchlist, evals_result=evals_result)

>>> print(evals_result['eval']['logloss'])
>>> print(evals_result)

Prints:

['0.684877', '0.676767', '0.668817']

{'train': {'logloss': ['0.684954', '0.676917', '0.669036'], 'error': ['0.04652', '0.04652', '0.04652']}, 'eval': {'logloss': ['0.684877', '0.676767', '0.668817'], 'error': ['0.042831', '0.042831', '0.042831']}}
2015-10-11 01:09:05 +02:00
sinhrks
b958c55ac6 CV returns ndarray or DataFrame 2015-10-02 22:38:03 +09:00
Far0n
0406c64a5d bugfix evals_result regex 2015-09-14 11:25:41 +02:00
tqchen
60217a2c02 checkin all python 2015-07-30 22:08:48 -07:00