Skip to content

Commit

Permalink
Merge pull request #54 from compneurobilbao/hotfix-toy-data-precision
Browse files Browse the repository at this point in the history
ENH: Changed synthetic data and generation to 3 floating point decimals
  • Loading branch information
JGarciaCondado authored Oct 1, 2024
2 parents 48b3b87 + 5e74522 commit fece052
Show file tree
Hide file tree
Showing 4 changed files with 3,004 additions and 3,004 deletions.
8 changes: 4 additions & 4 deletions src/ageml/datasets/synthetic_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ def generate_synthetic_data(save: bool = False, output_dir: str = None):
covar_data_path = os.path.join(save_path, "toy_covar.csv")
systems_path = os.path.join(save_path, "toy_systems.txt")

all_synthetic_data.to_csv(features_path, index=True, header=True)
clinical_data.to_csv(clinical_path, index=True, header=True)
factors_data.to_csv(factors_path, index=True, header=True)
covar_data.to_csv(covar_data_path, index=True, header=True)
all_synthetic_data.to_csv(features_path, index=True, header=True, float_format="%.3f")
clinical_data.to_csv(clinical_path, index=True, header=True, float_format="%.3f")
factors_data.to_csv(factors_path, index=True, header=True, float_format="%.3f")
covar_data.to_csv(covar_data_path, index=True, header=True, float_format="%.3f")

# Write systems data to a .txt file exactly as it is
with open(systems_path, "w") as f:
Expand Down
Loading

0 comments on commit fece052

Please sign in to comment.