Skip to content

Commit

Permalink
fix convert signature (#80)
Browse files Browse the repository at this point in the history
* fix convert signature

* bump version
  • Loading branch information
GabrielGimenez authored Oct 3, 2024
1 parent d20a4f1 commit 1887906
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <bandits@loft.com.br>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion xgbse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ._meta import XGBSEBootstrapEstimator
from ._stacked_weibull import XGBSEStackedWeibull

__version__ = "0.3.2"
__version__ = "0.3.3"

__all__ = [
"XGBSEDebiasedBCE",
Expand Down
3 changes: 2 additions & 1 deletion xgbse/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 1887906

Please sign in to comment.