Skip to content
New issue

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

Issue with PH model median method #30

Open
benoitdes opened this issue Feb 19, 2025 · 0 comments
Open

Issue with PH model median method #30

benoitdes opened this issue Feb 19, 2025 · 0 comments
Assignees

Comments

@benoitdes
Copy link
Collaborator

benoitdes commented Feb 19, 2025

Hello,

I found an error when using the Proporitionnal Hazard Model. When I try to compute the median, I got an error (while it works with the mean). According to the documentation, both methods should accept similar arguments.

See the following code snippet to reproduce the error

import numpy as np
from relife.models import Weibull, ProportionalHazard
 
model = ProportionalHazard(Weibull(7, 0.05), coef=(0.1, 0.2))
covar = np.random.random((10,2))
 
model.mean(covar[3, :]) # OK
model.median(covar[3, :]) # ERROR
@21ch216 21ch216 self-assigned this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants