Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cardiac/cardiac_mri_diagnosis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main():
landmark_path = os.path.join(cfg.DATASET.ROOT, base_dir, cfg.DATASET.LANDMARK_FILE)
landmark_df = pd.read_csv(landmark_path, index_col="Subject").loc[patient_ids] # read .csv file as dataframe
landmarks = landmark_df.iloc[:, :-1].values
y = landmark_df["Group"].values
y = landmark_df["Group"].to_numpy(copy=True) # copy: pandas >= 3 returns a read-only view
y[np.where(y != 0)] = 1 # convert to binary classification problem, i.e. no PH vs PAH

# plot the first phase of images with landmarks
Expand Down
2 changes: 1 addition & 1 deletion cardiac/cardiac_mri_diagnosis/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"landmark_path = os.path.join(cfg.DATASET.ROOT, base_dir, cfg.DATASET.LANDMARK_FILE)\n",
"landmark_df = pd.read_csv(landmark_path, index_col=\"Subject\").loc[patient_ids] # read .csv file as dataframe\n",
"landmarks = landmark_df.iloc[:, :-1].values\n",
"y = landmark_df[\"Group\"].values\n",
"y = landmark_df[\"Group\"].to_numpy(copy=True) # copy: pandas >= 3 returns a read-only view\n",
"y[np.where(y != 0)] = 1 # convert to binary classification problem, i.e. no PH vs PAH"
],
"cell_type": "code",
Expand Down
Loading