diff --git a/README.md b/README.md index f013a13..dda1ecf 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,7 @@ To cite this repository: author = {Davi Vieira and Gabriel Gimenez and Guilherme Marmerola and Vitor Estima}, title = {XGBoost Survival Embeddings: improving statistical properties of XGBoost survival analysis implementation}, url = {http://github.com/loft-br/xgboost-survival-embeddings}, - version = {0.3.2}, + version = {0.3.3}, year = {2021}, } ``` diff --git a/pyproject.toml b/pyproject.toml index 4feee28..f234726 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xgbse" -version = "0.3.2" +version = "0.3.3" description = "Improving XGBoost survival analysis with embeddings and debiased estimators" authors = ["Loft Data Science Team "] readme = "README.md" diff --git a/xgbse/__init__.py b/xgbse/__init__.py index 38ab651..4bf4203 100644 --- a/xgbse/__init__.py +++ b/xgbse/__init__.py @@ -5,7 +5,7 @@ from ._meta import XGBSEBootstrapEstimator from ._stacked_weibull import XGBSEStackedWeibull -__version__ = "0.3.2" +__version__ = "0.3.3" __all__ = [ "XGBSEDebiasedBCE", diff --git a/xgbse/converters.py b/xgbse/converters.py index 44783b8..b737563 100644 --- a/xgbse/converters.py +++ b/xgbse/converters.py @@ -42,7 +42,7 @@ def convert_y(y): return y[event_field], y[time_field] -def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool): +def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool = False): """Convert (X, y) data format to xgb.DMatrix format, either using cox or aft models. Args: @@ -51,6 +51,7 @@ def convert_data_to_xgb_format(X, y, objective, enable_categorical: bool): y (structured array(numpy.bool_, numpy.number)): binary event indicator as first field, and time of event or time of censoring as second field. objective (string): one of 'survival:aft' or 'survival:cox' + enable_categorical (bool): whether to enable categorical features - default is False Returns: xgb.DMatrix: data to train xgb