Skip to content

Commit 1887906

Browse files
fix convert signature (#80)
* fix convert signature * bump version
1 parent d20a4f1 commit 1887906

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ To cite this repository:
409409
author = {Davi Vieira and Gabriel Gimenez and Guilherme Marmerola and Vitor Estima},
410410
title = {XGBoost Survival Embeddings: improving statistical properties of XGBoost survival analysis implementation},
411411
url = {http://github.com/loft-br/xgboost-survival-embeddings},
412-
version = {0.3.2},
412+
version = {0.3.3},
413413
year = {2021},
414414
}
415415
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xgbse"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
description = "Improving XGBoost survival analysis with embeddings and debiased estimators"
55
authors = ["Loft Data Science Team <bandits@loft.com.br>"]
66
readme = "README.md"

xgbse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ._meta import XGBSEBootstrapEstimator
66
from ._stacked_weibull import XGBSEStackedWeibull
77

8-
__version__ = "0.3.2"
8+
__version__ = "0.3.3"
99

1010
__all__ = [
1111
"XGBSEDebiasedBCE",

xgbse/converters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def convert_y(y):
4242
return y[event_field], y[time_field]
4343

4444

45-
def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool):
45+
def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool = False):
4646
"""Convert (X, y) data format to xgb.DMatrix format, either using cox or aft models.
4747
4848
Args:
@@ -51,6 +51,7 @@ def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool):
5151
y (structured array(numpy.bool_, numpy.number)): binary event indicator as first field,
5252
and time of event or time of censoring as second field.
5353
objective (string): one of 'survival:aft' or 'survival:cox'
54+
enable_categorical (bool): whether to enable categorical features - default is False
5455
5556
Returns:
5657
xgb.DMatrix: data to train xgb

0 commit comments

Comments
 (0)