Skip to content

Commit

Permalink
modified: estimators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragnagpal committed Jun 28, 2022
1 parent cc0f00e commit 9e95ad1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auton_survival/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def _predict_dcph(model, features, times):
if isinstance(times, float) or isinstance(times, int):
times = [float(times)]

if isinstance(times, np.ndarray):
times = times.ravel().tolist()

return model.predict_survival(x=features.values, t=times)

def _fit_cph(features, outcomes, val_data, random_seed, **hyperparams):
Expand Down Expand Up @@ -378,7 +381,7 @@ def _fit_dsm(features, outcomes, val_data, random_seed, **hyperparams):

k = hyperparams.get("k", 3)
layers = hyperparams.get("layers", [100])
epochs = hyperparams.get("iters", 10)
epochs = hyperparams.get("iters", 50)
distribution = hyperparams.get("distribution", "Weibull")
temperature = hyperparams.get("temperature", 1.0)
lr = hyperparams.get("learning_rate", 1e-3)
Expand Down

0 comments on commit 9e95ad1

Please sign in to comment.