We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, there is a bug when we turn off the auto_scaler.
Sample code: coxph = NonLinearCoxPHModel(auto_scaler=False) coxph.fit(feature_train, time_train, event_train)
UnboundLocalError Traceback (most recent call last) in 1 coxph = NonLinearCoxPHModel(auto_scaler=False) ----> 2 coxph.fit(feature_train, time_train, event_train)
/opt/conda/lib/python3.7/site-packages/pysurvival/models/semi_parametric.py in fit(self, X, T, E, init_method, optimizer, lr, num_epochs, dropout, batch_normalization, bn_and_dropout, l2_reg, verbose) 608 T = T[order] 609 E = E[order] --> 610 X_original = X_original[order, :] 611 self.times = np.unique(T[E.astype(bool)]) 612 self.nb_times = len(self.times)
UnboundLocalError: local variable 'X_original' referenced before assignment
pysurvival/pysurvival/models/semi_parametric.py
Line 367 in 841b9bc
fix suggestion (starting from line 602):
# Scaling data if self.auto_scaler: X_original = self.scaler.fit_transform( X ) else: X_original = X
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, there is a bug when we turn off the auto_scaler.
Sample code:
coxph = NonLinearCoxPHModel(auto_scaler=False)
coxph.fit(feature_train, time_train, event_train)
Error:
UnboundLocalError Traceback (most recent call last)
in
1 coxph = NonLinearCoxPHModel(auto_scaler=False)
----> 2 coxph.fit(feature_train, time_train, event_train)
/opt/conda/lib/python3.7/site-packages/pysurvival/models/semi_parametric.py in fit(self, X, T, E, init_method, optimizer, lr, num_epochs, dropout, batch_normalization, bn_and_dropout, l2_reg, verbose)
608 T = T[order]
609 E = E[order]
--> 610 X_original = X_original[order, :]
611 self.times = np.unique(T[E.astype(bool)])
612 self.nb_times = len(self.times)
UnboundLocalError: local variable 'X_original' referenced before assignment
pysurvival/pysurvival/models/semi_parametric.py
Line 367 in 841b9bc
fix suggestion (starting from line 602):
The text was updated successfully, but these errors were encountered: