The MRIQC classifier for T1w images¶
MRIQC is shipped with a random-forests classifier, using the combination of the ABIDE and DS030 datasets as training sample.
To predict the quality labels (0=”accept”, 1=”reject”) on a features table
computed by mriqc
with the default classifier, the command line
is as follows:
mriqc_clf --load-classifier -X aMRIQC.csv -o mypredictions.csv
where aMRIQC.csv
is the file generated by the group
level run of
mriqc
.
Custom classifiers can be fitted using the same mriqc_clf
tool in fitting
mode:
mriqc_clf --train aMRIQC_train.csv labels.csv --log-file fit_clf.log --save-classifier myclassifier.pklz
where aMRIQC_train.csv
contains the IQMs calculated by mriqc
and labels.csv
contains
the matching ratings assigned by an expert.
The labels can be numerical (-1``= exclude, ``0``= doubtful, ``1
= accept) or textual (“bad”, “fail” can be
used for exclude; “may be” or “maybe” for doubtful and “ok”, “good” for accept).
The trained classifier can be then used for prediction on unseen data with the command at the top, indicating now which classifier should be used:
mriqc_clf --load-classifier myclassifier.pklz -X aMRIQC.csv -o mypredictions.csv
Predictions are stored as a CSV file, containing the BIDS identifiers as
indexing columns and the predicted quality label under the prediction
column.