Radiomics-related modules for extraction and experimenting
Project description
Simple pipeline for experimenting with radiomics features
docker run -p 8501:8501 -v <your_data_dir>:/data -it piotrekwoznicki/classy-radiomics:0.1 |
pip install --upgrade classrad |
Installation from source
git clone https://github.com/pwoznicki/ClassyRadiomics.git
cd ClassyRadiomics
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",
)
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="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.1.tar.gz
(1.3 MB
view details)
File details
Details for the file classrad-0.1.tar.gz
.
File metadata
- Download URL: classrad-0.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7428021f58686af95424fafd40aea8b7b04643380dbec505e5885a53f26ca2c |
|
MD5 | c99b9a1a43c4e1345855928d6bb57138 |
|
BLAKE2b-256 | 16911d5a002e741e2b770eeb5e70a5fb43c3dece7f9fc908b107115ef9607227 |