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
Please kindly let me know how to make it works.
The text was updated successfully, but these errors were encountered:
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_hazard
Please kindly let me know how to make it works.
The text was updated successfully, but these errors were encountered: