autonlab / auton-survival

Auton Survival - an open source package for Regression, Counterfactual Estimation, Evaluation and Phenotyping with Censored Time-to-Events
http://autonlab.github.io/auton-survival
MIT License
315 stars 74 forks source link

Error in DSM on Support Dataset notebook #139

Open kevinlazenby opened 8 months ago

kevinlazenby commented 8 months ago

Hi, thank you for making this great package!

I am trying to run the DSM on Support Dataset notebook, but I get the following error message when I attempt to run the code snippet below the Model Training and Selection heading.

    model.fit(x_train, t_train, e_train, iters = 100, learning_rate = param['learning_rate'])

  File ~\auton-survival\auton_survival\models\dsm\__init__.py:246 in fit
    processed_data = self._preprocess_training_data(x, t, e,

  File ~\auton-survival\auton_survival\models\dsm\__init__.py:324 in _preprocess_training_data
    x_train = torch.from_numpy(x_train).double()

TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, complex64, complex128, int64, int32, int16, int8, uint8, and bool.

However, I am confused because I can successfully run the RDSM example notebook with the PBC dataset, and in that case, the model.fit() function works even when the arguments x_train, t_train, and e_train are arrays of type numpy.object.

Thanks for your help!

MaKa19999 commented 7 months ago

Im having the same issue