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

Benchmark problem on survivalgan #261

Open
BioinfoLabImmuno opened this issue Mar 6, 2024 · 1 comment
Open

Benchmark problem on survivalgan #261

BioinfoLabImmuno opened this issue Mar 6, 2024 · 1 comment

Comments

@BioinfoLabImmuno
Copy link

What?

I want to evaluate the synthetic data generated but I have this code:

from synthcity.benchmark import Benchmarks

df=df.loc[df['OS_time']>0,:]
loader = SurvivalAnalysisDataLoader(
    df,
    target_column="os_event",
    time_to_event_column="OS_time",
)
score = Benchmarks.evaluate(
    [(f"test_{model}", model, {}) for model in ["survival_gan"]],
    loader,
    synthetic_size=100,
    repeats=2,
    task_type="survival_analysis",
)

Here I have the error

)     time_horizons = np.linspace(T.min(), T.max(), num=5)[1:-1].tolist()

ValueError: The time_to_event_column contains 1 values less than or equal to zero. Please remove them.

I have check the loader value of time_to_event is a numeric no 0 are present.
Could you please help me?

@robsdavis
Copy link
Contributor

Hi @BioinfoLabImmuno,

This error occurs if applying a filter like this data[data[time_to_event_column] > 0] changes the value of the first dimension of the shape of the data. Can you see why your data would cause this to happen? for example, the time to event value cannot be negative

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