Radiomics-related modules for extraction and experimenting
Project description
Simple pipeline for experimenting with radiomics features
Installation
git clone https://github.com/piotrekwoznicki/ClassyRadiomics.git
cd classrad
pip install -e .
Example - Hydronephrosis detection from CT images:
Extract radiomics features and save them to CSV table
df = pd.read_csv(table_dir / "paths.csv")
extractor = FeatureExtractor(
df=df,
out_path=(table_dir / "features.csv"),
image_col="img_path",
mask_col="seg_path",
verbose=True,
)
extractor.extract_features()
Create a dataset from the features table
feature_df = pd.read_csv(table_dir / "features.csv")
data = Dataset(
dataframe=feature_df,
features=feature_cols,
target=label_col="Hydronephrosis",
task_name="Hydronephrosis detection"
)
data.cross_validation_split_test_from_column(
column_name="cohort", test_value="control"
)
Select classifiers to compare
classifier_names = [
"Gaussian Process Classifier",
"Logistic Regression",
"SVM",
"Random Forest",
"XGBoost",
]
classifiers = [MLClassifier(name) for name in classifier_names]
Create an evaluator to train and evaluate selected classifiers
evaluator = Evaluator(dataset=data, models=classifiers)
evaluator.evaluate_cross_validation()
evaluator.boxplot_by_class()
evaluator.plot_all_cross_validation()
evaluator.plot_test()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
classrad-0.0.3.tar.gz
(7.8 kB
view hashes)