You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is error regarding to input dimensions of GeneralizedGammaRegressionFitter.
See this example;
from lifelines import GeneralizedGammaRegressionFitter
from lifelines.datasets import load_regression_dataset
regression_dataset = load_regression_dataset()
ggr = GeneralizedGammaRegressionFitter()
ggr.fit_intercept = True
ggr.fit(regression_dataset, 'T', event_col='E')
plotting Survival Function works normally
ggr.plot_partial_effects_on_outcome('var1', values=np.arange(-7,8), cmap='coolwarm')
but plotting Hazard function gives this value error regarding to dimensions of input.
ggr.plot_partial_effects_on_outcome('var1', values=np.arange(-7,8), cmap='coolwarm', y='hazard')
>>> ValueError: Length of values (200) does not match length of index (15)
By the way, I've drilled down to the source code and found that this error comes from self.predict_hazard
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There is error regarding to input dimensions of GeneralizedGammaRegressionFitter.
See this example;
plotting Survival Function works normally
ggr.plot_partial_effects_on_outcome('var1', values=np.arange(-7,8), cmap='coolwarm')but plotting Hazard function gives this value error regarding to dimensions of input.
By the way, I've drilled down to the source code and found that this error comes from
self.predict_hazardPlease kindly let me know how to make it works.
Beta Was this translation helpful? Give feedback.
All reactions