Skip to content

Commit

Permalink
Scikit learn (#643)
Browse files Browse the repository at this point in the history
* Replace sklearn with scikit-learn

* Use underscore in python files

* Lint fix
  • Loading branch information
annehaley authored Jan 23, 2023
1 parent bf1050d commit da1d591
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion miqa/learning/correlator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

import pandas as pd
from sklearn.metrics import confusion_matrix
from scikit_learn.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()}')
Expand Down
7 changes: 6 additions & 1 deletion miqa/learning/nn_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
import itk
import monai
import numpy as np
from sklearn.metrics import classification_report, confusion_matrix, mean_squared_error, r2_score
from scikit_learn.metrics import (
classification_report,
confusion_matrix,
mean_squared_error,
r2_score,
)
import torch
from torch.utils.data import DataLoader
import torchio
Expand Down
2 changes: 1 addition & 1 deletion miqa/learning/nn_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
import numpy as np
import pandas as pd
from sklearn.metrics import confusion_matrix
from scikit_learn.metrics import confusion_matrix
import torch
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
'learning': [
'itk>=5.3rc4',
'monai',
'sklearn',
'scikit-learn',
'torch',
'torchio',
'wandb',
Expand Down

0 comments on commit da1d591

Please sign in to comment.