1937 Commits

Author SHA1 Message Date
Johan Manders
40566cdbba update sklearn.py because evals_result in training.py changed
Because I changed the training.py, the sklearn.py had to be changed also to be able to read all the data form evals_result.
2015-10-12 16:31:23 +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
Tong He
e9edb03eff Merge pull request #533 from kferris10/master
Switch default missing values from 0 to NA in R package
2015-10-08 10:47:28 -07:00
kferris
d5a34339e5 Updated Changes 2015-10-08 13:22:23 -04:00
kferris
32ca060094 Fix merge conflicts 2015-10-08 08:58:27 -04:00
Tong He
81d4d4d2c1 Update utils.R 2015-10-07 18:26:33 -07:00
kferris
7a94bdb60c Switch missing values from 0 to NA in R package 2015-10-07 18:51:47 -04:00
Tianqi Chen
3109069019 Merge pull request #525 from sinhrks/df_columns
Python supports pd.DataFrame with non-str columns
2015-10-04 10:01:09 -07:00
sinhrks
dbcb4c8729 Support non-str column names 2015-10-04 13:30:01 +09:00
Tianqi Chen
2859c190cd Merge pull request #522 from sinhrks/pandas
python DMatrix now accepts pandas DataFrame
2015-10-02 10:19:14 -07:00
Tianqi Chen
9c39f69559 Merge pull request #524 from sinhrks/cv_pandas
Python CV returns pd.DataFrame or np.ndarray
2015-10-02 10:18:13 -07:00
sinhrks
b958c55ac6 CV returns ndarray or DataFrame 2015-10-02 22:38:03 +09:00
sinhrks
b943becc61 python DMatrix now accepts pandas DataFrame 2015-10-01 22:52:32 +09:00
Tianqi Chen
db490d1c75 Merge pull request #503 from sinhrks/feature_types
Python: Add feature_types to DMatrix
2015-09-29 14:14:48 -07:00
sinhrks
f6f3473d17 Change to properties 2015-09-28 22:36:39 +09:00
sinhrks
db692a30e5 Add feature_types 2015-09-28 22:25:35 +09:00
Tianqi Chen
b0591c8042 Merge pull request #514 from nerdcha/master
Fix makefile typo
2015-09-21 15:05:20 -07:00
Jamie Hall
f5920f8cbd Fix makefile typo 2015-09-22 07:18:15 +10:00
Tianqi Chen
05b242d542 Merge pull request #511 from nerdcha/master
Use homebrew gcc if available
2015-09-20 17:18:38 -07:00
Jamie Hall
6c3e4d7d0d Use homebrew gcc if available 2015-09-21 08:55:42 +10:00
Tianqi Chen
f28459497d fix pylint in setup 2015-09-18 20:22:54 -07:00
Tianqi Chen
e558d45208 Update .travis.yml 2015-09-18 18:45:18 -07:00
Tianqi Chen
788741bbcb Merge pull request #507 from nerdcha/master
Restore Python3 compatibility
2015-09-18 18:32:29 -07:00
Jamie Hall
0bca4c8c3b Restore Python3 compatibility 2015-09-19 10:46:57 +10:00
Tianqi Chen
5ff0fcc693 Merge pull request #504 from irachex/contributor
Add contributor
2015-09-17 19:38:22 -07:00
Huayi Zhang
c49c6565e5 Add contributor 2015-09-18 10:35:41 +08:00
Tianqi Chen
a92d21ce24 Merge pull request #502 from irachex/fix_setup
Fix python setup: avoid import numpy in setup.py
2015-09-17 09:35:46 -07:00
Tianqi Chen
808c0a6dff Merge pull request #497 from sinhrks/numpy_check
Bug: Fix numpy array check logic
2015-09-17 09:19:58 -07:00
sinhrks
f7d434aec2 Fix numpy array check logic 2015-09-17 22:51:44 +09:00
Huayi Zhang
6af98bec16 Fix python setup: avoid import numpy in setup.py
Currently `pip install xgboost` will raise traceback like this

```
Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "/tmp/pip-build-IAdqYE/xgboost/setup.py", line 20, in <module>
    import xgboost
  File "./xgboost/__init__.py", line 8, in <module>
    from .core import DMatrix, Booster
  File "./xgboost/core.py", line 12, in <module>
    import numpy as np
ImportError: No module named numpy
```

We should avoid importing numpy in setup.py and let pip install numpy and scipy automatically.
That's what `install_requires` for.
2015-09-17 14:49:19 +08:00
Tianqi Chen
cf2ec238a4 Merge pull request #496 from sinhrks/str_cln
Cleanup str roundtrip using ctypes
2015-09-16 16:01:42 -07:00
sinhrks
bb6b7ded55 Cleanup str roundtrip using ctypes 2015-09-17 04:10:19 +09:00
Tianqi Chen
bad4a27b9f Merge pull request #495 from aeeilllmrx/master
minor spelling and grammar changes
2015-09-16 08:40:51 -07:00
Tianqi Chen
f5eb345c8a Merge pull request #498 from sinhrks/check_binary
BUG: incorrect model_file results in segfault
2015-09-16 08:40:11 -07:00
sinhrks
db0c9e1c2d BUG: incorrect model_file results in segfault 2015-09-16 22:02:30 +09:00
Alex Miller
0b143e6d22 spelling changes 2015-09-16 01:39:01 -07:00
Alex Miller
7f3bc03990 spelling and grammar 2015-09-16 01:33:28 -07:00
Alex Miller
1f624a8005 Merge pull request #2 from aeeilllmrx/aeeilllmrx-spelling-and-grammar
spelling and grammar changes
2015-09-16 01:32:43 -07:00
Alex Miller
030a4e4e25 spelling and grammar changes 2015-09-16 01:23:31 -07:00
Alex Miller
16781ac8f9 Merge pull request #1 from dmlc/master
update from original
2015-09-16 01:16:31 -07:00
Tianqi Chen
ae43fd7c7a Merge pull request #488 from sinhrks/pyfeaturenames
Support feature names in Python package
2015-09-15 09:56:55 -07:00
sinhrks
6063d243eb Mac build fix 2015-09-15 18:39:06 +09:00
Tianqi Chen
bda3282f6d Merge pull request #492 from Far0n/patch-1
bugfix evals_result regex
2015-09-14 08:46:58 -07:00
sinhrks
48ac946d9f Use ctypes 2015-09-14 22:12:19 +09:00
Far0n
0406c64a5d bugfix evals_result regex 2015-09-14 11:25:41 +02:00
Tianqi Chen
b1c94c7d86 Merge pull request #490 from phunterlau/master
add static link to gcc + openmp for MAC
2015-09-13 18:06:28 -07:00
phunterlau
529b80406c switch back to dynamic build by default 2015-09-13 17:36:49 -07:00
phunterlau
13c8d2ba74 add multi-thread static link for MAC 2015-09-13 17:34:37 -07:00
Hongliang Liu
cbb52b1d5d Merge pull request #2 from dmlc/master
rebase to current dmlc official version
2015-09-13 15:01:22 -07:00