-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from dzenanz/master
Remove SNR and CNR from training and inference
- Loading branch information
Showing
8 changed files
with
41 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import pandas as pd | ||
from sklearn.metrics import confusion_matrix | ||
|
||
df = pd.read_csv('M:/MIQA/data.csv') # manually converted TRUE/FALSE into 1/0 | ||
print(f'count NaN: {df.isnull().sum().sum()}') | ||
correlation_df = df.corr() | ||
correlation_df.to_csv('M:/MIQA/correlations2.csv') | ||
print(correlation_df) | ||
|
||
cm = pd.DataFrame(confusion_matrix(df['overall_qa_assessment'], df['cnr'])) | ||
cm.to_csv('M:/MIQA/oQA_CNR.csv') | ||
print(cm) | ||
|
||
cm = pd.DataFrame(confusion_matrix(df['overall_qa_assessment'], df['snr'])) | ||
cm.to_csv('M:/MIQA/oQA_SNR.csv') | ||
print(cm) | ||
|
||
# df = pd.read_csv('M:/MIQA/PredictHD_small/phenotype/bids_image_qc_information.tsv', sep='\t') | ||
# df = df.drop(columns=['participant_id', 'session_id', 'series_number']) | ||
# df.to_csv('M:/MIQA/dataQA.csv') | ||
# print(f"count NaN: {df.isnull().sum().sum()}") | ||
# correlation_df = df.corr() | ||
# correlation_df.to_csv('M:/MIQA/correlations.csv') | ||
# print(correlation_df) |
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters