Skip to content

How can i see the model parameters #336

@MerveKaptan

Description

@MerveKaptan

Dear @AuguB Stijn,

I hope you are doing well!
Sometimes, I get unreasonable z-scores (more than 10.000) within my model (even after widening my bspline limits).
I checked the raw data and it seems fine.
In order to understand what is going on I wanted to save the whole output of model (sigma and residuals).
I was hoping that I will have these values when I save the results to a .csv as I did below. However, I am not seeing sigma there.

What would you recommend?

I see all of these --> but not sigma..

X,X,X,X,Y,Y_harmonized,Z,batch_effects,batch_effects,subjects,centiles,centiles,centiles,centiles,centiles
age,height,weight,z_slice,MEAN(area),MEAN(area),MEAN(area),sex,vendor,subjects,"('MEAN(area)', 0.05)","('MEAN(area)', 0.25)","('MEAN(area)', 0.5)","('MEAN(area)', 0.75)","('MEAN(area)', 0.95)"

this is my code:

transfer_dir = os.path.join(out_dir, "transfer")
# Run transfer
model.savemodel = True
model.saveresults = True
model.saveplots = True
model.evaluate_model = True
model.save_dir = transfer_dir
transfer_pred = model.predict(transfer_data)

transfer_data.to_dataframe().to_csv(os.path.join(save_dir, f"transfer_{metric_prefix}.csv"))

# inspect/save from the returned NormData
df = transfer_pred.to_dataframe()
print(df.columns)  # this replaces: print(model.results.columns)


out_path = Path(transfer_dir, f"{metric_prefix}_transfer_full_results.csv")
df.to_csv(out_path, index=False)
print("✓ saved transfer outputs to", out_path)

Thanks so much!!!
Merve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions