Voxel-Based Morphometry on Oasis dataset#

This example uses Voxel-Based Morphometry (VBM) to study the relationship between aging and gray matter density.

The data come from the OASIS project. If you use it, you need to agree with the data usage agreement available on the website.

It has been run through a standard VBM pipeline (using SPM8 and NewSegment) to create VBM maps, which we study here.

Predictive modeling analysis: VBM bio-markers of aging?#

We run a standard SVM-ANOVA nilearn pipeline to predict age from the VBM data. We use only 100 subjects from the OASIS dataset to limit the memory usage.

Note that for an actual predictive modeling study of aging, the study should be ran on the full set of subjects. Also, all parameters should be set by cross-validation. This includes the smoothing applied to the data and the number of features selected by the ANOVA step. Indeed, even these data-preparation parameter impact significantly the prediction score.

Also, parameters such as the smoothing should be applied to the data and the number of features selected by the ANOVA step should be set by nested cross-validation, as they impact significantly the prediction score.

Brain mapping with mass univariate#

SVM weights are very noisy, partly because heavy smoothing is detrimental for the prediction here. A standard analysis using mass-univariate GLM (here permuted to have exact correction for multiple comparisons) gives a much clearer view of the important regions.


Note

If you are using Nilearn with a version older than 0.9.0, then you should either upgrade your version or import maskers from the input_data module instead of the maskers module.

That is, you should manually replace in the following example all occurrences of:

from nilearn.maskers import NiftiMasker

with:

from nilearn.input_data import NiftiMasker
# Authors: Elvis Dhomatob, <elvis.dohmatob@inria.fr>, Apr. 2014
#          Virgile Fritsch, <virgile.fritsch@inria.fr>, Apr 2014
#          Gael Varoquaux, Apr 2014
#          Andres Hoyos-Idrobo, Apr 2017
import numpy as np
import matplotlib.pyplot as plt
from nilearn import datasets
from nilearn.maskers import NiftiMasker
from nilearn.image import get_data

n_subjects = 100  # more subjects requires more memory

Load Oasis dataset#

oasis_dataset = datasets.fetch_oasis_vbm(
    n_subjects=n_subjects, legacy_format=False
)
gray_matter_map_filenames = oasis_dataset.gray_matter_maps
age = oasis_dataset.ext_vars['age'].values

# Split data into training set and test set
from sklearn.model_selection import train_test_split
gm_imgs_train, gm_imgs_test, age_train, age_test = train_test_split(
    gray_matter_map_filenames, age, train_size=.6, random_state=0)

# print basic information on the dataset
print('First gray-matter anatomy image (3D) is located at: %s' %
      oasis_dataset.gray_matter_maps[0])  # 3D data
print('First white-matter anatomy image (3D) is located at: %s' %
      oasis_dataset.white_matter_maps[0])  # 3D data
First gray-matter anatomy image (3D) is located at: /home/runner/work/nilearn/nilearn/nilearn_data/oasis1/OAS1_0001_MR1/mwrc1OAS1_0001_MR1_mpr_anon_fslswapdim_bet.nii.gz
First white-matter anatomy image (3D) is located at: /home/runner/work/nilearn/nilearn/nilearn_data/oasis1/OAS1_0001_MR1/mwrc2OAS1_0001_MR1_mpr_anon_fslswapdim_bet.nii.gz

Preprocess data#

nifti_masker = NiftiMasker(
    standardize=False,
    smoothing_fwhm=2,
    memory='nilearn_cache')  # cache options
gm_maps_masked = nifti_masker.fit_transform(gm_imgs_train)

# The features with too low between-subject variance are removed using
# :class:`sklearn.feature_selection.VarianceThreshold`.
from sklearn.feature_selection import VarianceThreshold
variance_threshold = VarianceThreshold(threshold=.01)
gm_maps_thresholded = variance_threshold.fit_transform(gm_maps_masked)

# Then we convert the data back to the mask image in order to use it for
# decoding process
mask = nifti_masker.inverse_transform(variance_threshold.get_support())

Prediction pipeline with ANOVA and SVR using nilearn.decoding.DecoderRegressor Object

# In nilearn we can benefit from the built-in DecoderRegressor object to
# do ANOVA with SVR instead of manually defining the whole pipeline.
# This estimator also uses Cross Validation to select best models and ensemble
# them. Furthermore, you can pass n_jobs=<some_high_value> to the
# DecoderRegressor class to take advantage of a multi-core system.
# To save time (because these are anat images with many voxels), we include
# only the 1-percent voxels most correlated with the age variable to fit. We
# also want to set mask hyperparameter to be the mask we just obtained above.

from nilearn.decoding import DecoderRegressor
decoder = DecoderRegressor(estimator='svr', mask=mask,
                           scoring='neg_mean_absolute_error',
                           screening_percentile=1,
                           n_jobs=1)
# Fit and predict with the decoder
decoder.fit(gm_imgs_train, age_train)

# Sort test data for better visualization (trend, etc.)
perm = np.argsort(age_test)[::-1]
age_test = age_test[perm]
gm_imgs_test = np.array(gm_imgs_test)[perm]
age_pred = decoder.predict(gm_imgs_test)

prediction_score = -np.mean(decoder.cv_scores_['beta'])

print("=== DECODER ===")
print("explained variance for the cross-validation: %f" % prediction_score)
print()
=== DECODER ===
explained variance for the cross-validation: 10.670598

Visualization#

weight_img = decoder.coef_img_['beta']

# Create the figure
from nilearn.plotting import plot_stat_map, show
bg_filename = gray_matter_map_filenames[0]
z_slice = 0
display = plot_stat_map(weight_img, bg_img=bg_filename,
                        display_mode='z', cut_coords=[z_slice])
display.title("SVM weights")
show()
plot oasis vbm

Visualize the quality of predictions#

plt.figure(figsize=(6, 4.5))
plt.suptitle("Decoder: Mean Absolute Error %.2f years" % prediction_score)
linewidth = 3
plt.plot(age_test, label="True age", linewidth=linewidth)
plt.plot(age_pred, '--', c="g", label="Predicted age", linewidth=linewidth)
plt.ylabel("age")
plt.xlabel("subject")
plt.legend(loc="best")
plt.figure(figsize=(6, 4.5))
plt.plot(age_test - age_pred, label="True age - predicted age",
         linewidth=linewidth)
plt.xlabel("subject")
plt.legend(loc="best")
  • Decoder: Mean Absolute Error 10.67 years
  • plot oasis vbm
<matplotlib.legend.Legend object at 0x7fd08ee0c9d0>

Inference with massively univariate model#

print("Massively univariate model")

gm_maps_masked = NiftiMasker().fit_transform(gray_matter_map_filenames)
data = variance_threshold.fit_transform(gm_maps_masked)

# Statistical inference
from nilearn.mass_univariate import permuted_ols
neg_log_pvals, t_scores_original_data, _ = permuted_ols(
    age, data,  # + intercept as a covariate by default
    n_perm=2000,  # 1,000 in the interest of time; 10000 would be better
    verbose=1, # display progress bar
    n_jobs=1)  # can be changed to use more CPUs
signed_neg_log_pvals = neg_log_pvals * np.sign(t_scores_original_data)
signed_neg_log_pvals_unmasked = nifti_masker.inverse_transform(
    variance_threshold.inverse_transform(signed_neg_log_pvals))

# Show results
threshold = -np.log10(0.1)  # 10% corrected

fig = plt.figure(figsize=(5.5, 7.5), facecolor='k')

display = plot_stat_map(signed_neg_log_pvals_unmasked, bg_img=bg_filename,
                        threshold=threshold, cmap=plt.cm.RdBu_r,
                        display_mode='z', cut_coords=[z_slice],
                        figure=fig)
title = ('Negative $\\log_{10}$ p-values'
         '\n(Non-parametric + max-type correction)')
display.title(title, y=1.2)

n_detections = (get_data(signed_neg_log_pvals_unmasked) > threshold).sum()
print('\n%d detections' % n_detections)

show()
plot oasis vbm
Massively univariate model
[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.
Job #1, processed 0/2000 permutations (0.00%, 306.67781829833984 seconds remaining)
Job #1, processed 10/2000 permutations (0.50%, 56.25935244560242 seconds remaining)
Job #1, processed 20/2000 permutations (1.00%, 53.21027183532715 seconds remaining)
Job #1, processed 30/2000 permutations (1.50%, 51.81800055503846 seconds remaining)
Job #1, processed 40/2000 permutations (2.00%, 51.09762978553772 seconds remaining)
Job #1, processed 50/2000 permutations (2.50%, 50.60469031333923 seconds remaining)
Job #1, processed 60/2000 permutations (3.00%, 50.12710293134054 seconds remaining)
Job #1, processed 70/2000 permutations (3.50%, 49.68666049412319 seconds remaining)
Job #1, processed 80/2000 permutations (4.00%, 49.27789306640625 seconds remaining)
Job #1, processed 90/2000 permutations (4.50%, 48.923953135808304 seconds remaining)
Job #1, processed 100/2000 permutations (5.00%, 48.65227961540222 seconds remaining)
Job #1, processed 110/2000 permutations (5.50%, 48.3795550736514 seconds remaining)
Job #1, processed 120/2000 permutations (6.00%, 48.07043687502543 seconds remaining)
Job #1, processed 130/2000 permutations (6.50%, 47.76561605013334 seconds remaining)
Job #1, processed 140/2000 permutations (7.00%, 47.4463849067688 seconds remaining)
Job #1, processed 150/2000 permutations (7.50%, 47.13866488138835 seconds remaining)
Job #1, processed 160/2000 permutations (8.00%, 46.88648593425751 seconds remaining)
Job #1, processed 170/2000 permutations (8.50%, 46.567375659942634 seconds remaining)
Job #1, processed 180/2000 permutations (9.00%, 46.29564144876268 seconds remaining)
Job #1, processed 190/2000 permutations (9.50%, 45.98434531061273 seconds remaining)
Job #1, processed 200/2000 permutations (10.00%, 45.68675494194031 seconds remaining)
Job #1, processed 210/2000 permutations (10.50%, 45.355790830793836 seconds remaining)
Job #1, processed 220/2000 permutations (11.00%, 45.06181445988742 seconds remaining)
Job #1, processed 230/2000 permutations (11.50%, 44.795140743255615 seconds remaining)
Job #1, processed 240/2000 permutations (12.00%, 44.527713457743324 seconds remaining)
Job #1, processed 250/2000 permutations (12.50%, 44.25886511802673 seconds remaining)
Job #1, processed 260/2000 permutations (13.00%, 43.97727980980506 seconds remaining)
Job #1, processed 270/2000 permutations (13.50%, 43.67474029682301 seconds remaining)
Job #1, processed 280/2000 permutations (14.00%, 43.372138772692004 seconds remaining)
Job #1, processed 290/2000 permutations (14.50%, 43.01568549254845 seconds remaining)
Job #1, processed 300/2000 permutations (15.00%, 42.71079579989116 seconds remaining)
Job #1, processed 310/2000 permutations (15.50%, 42.41803762220567 seconds remaining)
Job #1, processed 320/2000 permutations (16.00%, 42.14323174953461 seconds remaining)
Job #1, processed 330/2000 permutations (16.50%, 41.840735616105974 seconds remaining)
Job #1, processed 340/2000 permutations (17.00%, 41.579378464642694 seconds remaining)
Job #1, processed 350/2000 permutations (17.50%, 41.25 seconds remaining)
Job #1, processed 360/2000 permutations (18.00%, 40.96498754289415 seconds remaining)
Job #1, processed 370/2000 permutations (18.50%, 40.64596266359896 seconds remaining)
Job #1, processed 380/2000 permutations (19.00%, 40.33391761779785 seconds remaining)
Job #1, processed 390/2000 permutations (19.50%, 40.01617784989186 seconds remaining)
Job #1, processed 400/2000 permutations (20.00%, 39.71854496002197 seconds remaining)
Job #1, processed 410/2000 permutations (20.50%, 39.43330361784958 seconds remaining)
Job #1, processed 420/2000 permutations (21.00%, 39.10779648735409 seconds remaining)
Job #1, processed 430/2000 permutations (21.50%, 38.828731270723566 seconds remaining)
Job #1, processed 440/2000 permutations (22.00%, 38.55363900011236 seconds remaining)
Job #1, processed 450/2000 permutations (22.50%, 38.306615352630615 seconds remaining)
Job #1, processed 460/2000 permutations (23.00%, 38.03146682614866 seconds remaining)
Job #1, processed 470/2000 permutations (23.50%, 37.72212391711296 seconds remaining)
Job #1, processed 480/2000 permutations (24.00%, 37.42567972342173 seconds remaining)
Job #1, processed 490/2000 permutations (24.50%, 37.135060470931386 seconds remaining)
Job #1, processed 500/2000 permutations (25.00%, 36.86379933357239 seconds remaining)
Job #1, processed 510/2000 permutations (25.50%, 36.59095331266814 seconds remaining)
Job #1, processed 520/2000 permutations (26.00%, 36.305126006786644 seconds remaining)
Job #1, processed 530/2000 permutations (26.50%, 36.01336768438232 seconds remaining)
Job #1, processed 540/2000 permutations (27.00%, 35.73004434726857 seconds remaining)
Job #1, processed 550/2000 permutations (27.50%, 35.4373385255987 seconds remaining)
Job #1, processed 560/2000 permutations (28.00%, 35.15989535195487 seconds remaining)
Job #1, processed 570/2000 permutations (28.50%, 34.884303741287766 seconds remaining)
Job #1, processed 580/2000 permutations (29.00%, 34.61936985213181 seconds remaining)
Job #1, processed 590/2000 permutations (29.50%, 34.35267513889377 seconds remaining)
Job #1, processed 600/2000 permutations (30.00%, 34.084863901138306 seconds remaining)
Job #1, processed 610/2000 permutations (30.50%, 33.82044667494102 seconds remaining)
Job #1, processed 620/2000 permutations (31.00%, 33.58558727848914 seconds remaining)
Job #1, processed 630/2000 permutations (31.50%, 33.319510467468746 seconds remaining)
Job #1, processed 640/2000 permutations (32.00%, 33.08238622546196 seconds remaining)
Job #1, processed 650/2000 permutations (32.50%, 32.83998392178462 seconds remaining)
Job #1, processed 660/2000 permutations (33.00%, 32.59700031714006 seconds remaining)
Job #1, processed 670/2000 permutations (33.50%, 32.35671064391065 seconds remaining)
Job #1, processed 680/2000 permutations (34.00%, 32.127815891714654 seconds remaining)
Job #1, processed 690/2000 permutations (34.50%, 31.879950115646142 seconds remaining)
Job #1, processed 700/2000 permutations (35.00%, 31.64039867264884 seconds remaining)
Job #1, processed 710/2000 permutations (35.50%, 31.398769744684998 seconds remaining)
Job #1, processed 720/2000 permutations (36.00%, 31.14709048800998 seconds remaining)
Job #1, processed 730/2000 permutations (36.50%, 30.895748174353823 seconds remaining)
Job #1, processed 740/2000 permutations (37.00%, 30.64725540779732 seconds remaining)
Job #1, processed 750/2000 permutations (37.50%, 30.41614055633545 seconds remaining)
Job #1, processed 760/2000 permutations (38.00%, 30.16225660474677 seconds remaining)
Job #1, processed 770/2000 permutations (38.50%, 29.9054728699969 seconds remaining)
Job #1, processed 780/2000 permutations (39.00%, 29.652323447740994 seconds remaining)
Job #1, processed 790/2000 permutations (39.50%, 29.409249607520767 seconds remaining)
Job #1, processed 800/2000 permutations (40.00%, 29.15799307823181 seconds remaining)
Job #1, processed 810/2000 permutations (40.50%, 28.912510377389417 seconds remaining)
Job #1, processed 820/2000 permutations (41.00%, 28.660723953712278 seconds remaining)
Job #1, processed 830/2000 permutations (41.50%, 28.415816941893244 seconds remaining)
Job #1, processed 840/2000 permutations (42.00%, 28.175824119931175 seconds remaining)
Job #1, processed 850/2000 permutations (42.50%, 27.91975624421064 seconds remaining)
Job #1, processed 860/2000 permutations (43.00%, 27.675564882367155 seconds remaining)
Job #1, processed 870/2000 permutations (43.50%, 27.427664214167102 seconds remaining)
Job #1, processed 880/2000 permutations (44.00%, 27.18206162886186 seconds remaining)
Job #1, processed 890/2000 permutations (44.50%, 26.936296286207906 seconds remaining)
Job #1, processed 900/2000 permutations (45.00%, 26.683378113640682 seconds remaining)
Job #1, processed 910/2000 permutations (45.50%, 26.434012845322325 seconds remaining)
Job #1, processed 920/2000 permutations (46.00%, 26.185775103776354 seconds remaining)
Job #1, processed 930/2000 permutations (46.50%, 25.93739389860502 seconds remaining)
Job #1, processed 940/2000 permutations (47.00%, 25.696829582782502 seconds remaining)
Job #1, processed 950/2000 permutations (47.50%, 25.451877857509416 seconds remaining)
Job #1, processed 960/2000 permutations (48.00%, 25.207032938798267 seconds remaining)
Job #1, processed 970/2000 permutations (48.50%, 24.960128034513023 seconds remaining)
Job #1, processed 980/2000 permutations (49.00%, 24.70930715969631 seconds remaining)
Job #1, processed 990/2000 permutations (49.50%, 24.462757628373424 seconds remaining)
Job #1, processed 1000/2000 permutations (50.00%, 24.220113039016724 seconds remaining)
Job #1, processed 1010/2000 permutations (50.50%, 23.968140979804616 seconds remaining)
Job #1, processed 1020/2000 permutations (51.00%, 23.72005659458684 seconds remaining)
Job #1, processed 1030/2000 permutations (51.50%, 23.473608081780593 seconds remaining)
Job #1, processed 1040/2000 permutations (52.00%, 23.227499374976528 seconds remaining)
Job #1, processed 1050/2000 permutations (52.50%, 22.97758218220302 seconds remaining)
Job #1, processed 1060/2000 permutations (53.00%, 22.730997989762503 seconds remaining)
Job #1, processed 1070/2000 permutations (53.50%, 22.48416219916299 seconds remaining)
Job #1, processed 1080/2000 permutations (54.00%, 22.237132999632095 seconds remaining)
Job #1, processed 1090/2000 permutations (54.50%, 21.992466860954913 seconds remaining)
Job #1, processed 1100/2000 permutations (55.00%, 21.755838177420877 seconds remaining)
Job #1, processed 1110/2000 permutations (55.50%, 21.514104052706884 seconds remaining)
Job #1, processed 1120/2000 permutations (56.00%, 21.27064435822623 seconds remaining)
Job #1, processed 1130/2000 permutations (56.50%, 21.028252569975052 seconds remaining)
Job #1, processed 1140/2000 permutations (57.00%, 20.7832579361765 seconds remaining)
Job #1, processed 1150/2000 permutations (57.50%, 20.537607618000195 seconds remaining)
Job #1, processed 1160/2000 permutations (58.00%, 20.2983864093649 seconds remaining)
Job #1, processed 1170/2000 permutations (58.50%, 20.053890067288002 seconds remaining)
Job #1, processed 1180/2000 permutations (59.00%, 19.806860014543695 seconds remaining)
Job #1, processed 1190/2000 permutations (59.50%, 19.557213811313407 seconds remaining)
Job #1, processed 1200/2000 permutations (60.00%, 19.308561325073242 seconds remaining)
Job #1, processed 1210/2000 permutations (60.50%, 19.062568126631177 seconds remaining)
Job #1, processed 1220/2000 permutations (61.00%, 18.81915243727262 seconds remaining)
Job #1, processed 1230/2000 permutations (61.50%, 18.573808755331893 seconds remaining)
Job #1, processed 1240/2000 permutations (62.00%, 18.32545288147465 seconds remaining)
Job #1, processed 1250/2000 permutations (62.50%, 18.07824969291687 seconds remaining)
Job #1, processed 1260/2000 permutations (63.00%, 17.838654347828456 seconds remaining)
Job #1, processed 1270/2000 permutations (63.50%, 17.59458894992438 seconds remaining)
Job #1, processed 1280/2000 permutations (64.00%, 17.35075481235981 seconds remaining)
Job #1, processed 1290/2000 permutations (64.50%, 17.107198079427082 seconds remaining)
Job #1, processed 1300/2000 permutations (65.00%, 16.860210785498985 seconds remaining)
Job #1, processed 1310/2000 permutations (65.50%, 16.61530751854409 seconds remaining)
Job #1, processed 1320/2000 permutations (66.00%, 16.37592713760607 seconds remaining)
Job #1, processed 1330/2000 permutations (66.50%, 16.133114938449143 seconds remaining)
Job #1, processed 1340/2000 permutations (67.00%, 15.888389676364499 seconds remaining)
Job #1, processed 1350/2000 permutations (67.50%, 15.644423078607629 seconds remaining)
Job #1, processed 1360/2000 permutations (68.00%, 15.400867686552159 seconds remaining)
Job #1, processed 1370/2000 permutations (68.50%, 15.156618948400455 seconds remaining)
Job #1, processed 1380/2000 permutations (69.00%, 14.912432515102884 seconds remaining)
Job #1, processed 1390/2000 permutations (69.50%, 14.668075878843128 seconds remaining)
Job #1, processed 1400/2000 permutations (70.00%, 14.421813624245779 seconds remaining)
Job #1, processed 1410/2000 permutations (70.50%, 14.177251519886314 seconds remaining)
Job #1, processed 1420/2000 permutations (71.00%, 13.935540031379377 seconds remaining)
Job #1, processed 1430/2000 permutations (71.50%, 13.693714802081768 seconds remaining)
Job #1, processed 1440/2000 permutations (72.00%, 13.449638975991144 seconds remaining)
Job #1, processed 1450/2000 permutations (72.50%, 13.206033690222378 seconds remaining)
Job #1, processed 1460/2000 permutations (73.00%, 12.96365831322866 seconds remaining)
Job #1, processed 1470/2000 permutations (73.50%, 12.724820307322911 seconds remaining)
Job #1, processed 1480/2000 permutations (74.00%, 12.484695647213911 seconds remaining)
Job #1, processed 1490/2000 permutations (74.50%, 12.243309297817666 seconds remaining)
Job #1, processed 1500/2000 permutations (75.00%, 12.002347230911255 seconds remaining)
Job #1, processed 1510/2000 permutations (75.50%, 11.762220995315653 seconds remaining)
Job #1, processed 1520/2000 permutations (76.00%, 11.526980299698678 seconds remaining)
Job #1, processed 1530/2000 permutations (76.50%, 11.286839717353871 seconds remaining)
Job #1, processed 1540/2000 permutations (77.00%, 11.049170701534717 seconds remaining)
Job #1, processed 1550/2000 permutations (77.50%, 10.807125968317832 seconds remaining)
Job #1, processed 1560/2000 permutations (78.00%, 10.564950215510834 seconds remaining)
Job #1, processed 1570/2000 permutations (78.50%, 10.322919030098399 seconds remaining)
Job #1, processed 1580/2000 permutations (79.00%, 10.082010341595998 seconds remaining)
Job #1, processed 1590/2000 permutations (79.50%, 9.841752235244655 seconds remaining)
Job #1, processed 1600/2000 permutations (80.00%, 9.600033819675446 seconds remaining)
Job #1, processed 1610/2000 permutations (80.50%, 9.361097747494716 seconds remaining)
Job #1, processed 1620/2000 permutations (81.00%, 9.121754181237868 seconds remaining)
Job #1, processed 1630/2000 permutations (81.50%, 8.88344468368343 seconds remaining)
Job #1, processed 1640/2000 permutations (82.00%, 8.645978921797218 seconds remaining)
Job #1, processed 1650/2000 permutations (82.50%, 8.408904985948043 seconds remaining)
Job #1, processed 1660/2000 permutations (83.00%, 8.172538271869522 seconds remaining)
Job #1, processed 1670/2000 permutations (83.50%, 7.935591729101307 seconds remaining)
Job #1, processed 1680/2000 permutations (84.00%, 7.698536918276832 seconds remaining)
Job #1, processed 1690/2000 permutations (84.50%, 7.460953887397721 seconds remaining)
Job #1, processed 1700/2000 permutations (85.00%, 7.224016680436976 seconds remaining)
Job #1, processed 1710/2000 permutations (85.50%, 6.986910104751587 seconds remaining)
Job #1, processed 1720/2000 permutations (86.00%, 6.750267671984296 seconds remaining)
Job #1, processed 1730/2000 permutations (86.50%, 6.5128297888474656 seconds remaining)
Job #1, processed 1740/2000 permutations (87.00%, 6.275012109471464 seconds remaining)
Job #1, processed 1750/2000 permutations (87.50%, 6.036952189036778 seconds remaining)
Job #1, processed 1760/2000 permutations (88.00%, 5.799527926878495 seconds remaining)
Job #1, processed 1770/2000 permutations (88.50%, 5.560192853043982 seconds remaining)
Job #1, processed 1780/2000 permutations (89.00%, 5.320316239689173 seconds remaining)
Job #1, processed 1790/2000 permutations (89.50%, 5.080638218192415 seconds remaining)
Job #1, processed 1800/2000 permutations (90.00%, 4.840637286504109 seconds remaining)
Job #1, processed 1810/2000 permutations (90.50%, 4.600740225934191 seconds remaining)
Job #1, processed 1820/2000 permutations (91.00%, 4.36036966921209 seconds remaining)
Job #1, processed 1830/2000 permutations (91.50%, 4.119945479221031 seconds remaining)
Job #1, processed 1840/2000 permutations (92.00%, 3.8792594619419263 seconds remaining)
Job #1, processed 1850/2000 permutations (92.50%, 3.6382961337630815 seconds remaining)
Job #1, processed 1860/2000 permutations (93.00%, 3.3971685876128497 seconds remaining)
Job #1, processed 1870/2000 permutations (93.50%, 3.1556465523765684 seconds remaining)
Job #1, processed 1880/2000 permutations (94.00%, 2.9140765717689026 seconds remaining)
Job #1, processed 1890/2000 permutations (94.50%, 2.672435393409123 seconds remaining)
Job #1, processed 1900/2000 permutations (95.00%, 2.4306023622813977 seconds remaining)
Job #1, processed 1910/2000 permutations (95.50%, 2.188611026833819 seconds remaining)
Job #1, processed 1920/2000 permutations (96.00%, 1.9461059967676797 seconds remaining)
Job #1, processed 1930/2000 permutations (96.50%, 1.7034628539505399 seconds remaining)
Job #1, processed 1940/2000 permutations (97.00%, 1.4608720602448455 seconds remaining)
Job #1, processed 1950/2000 permutations (97.50%, 1.217995435763628 seconds remaining)
Job #1, processed 1960/2000 permutations (98.00%, 0.9751756969763308 seconds remaining)
Job #1, processed 1970/2000 permutations (98.50%, 0.7316619030715246 seconds remaining)
Job #1, processed 1980/2000 permutations (99.00%, 0.4879320342131336 seconds remaining)
Job #1, processed 1990/2000 permutations (99.50%, 0.244076641360719 seconds remaining)
[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:   48.8s finished

1975 detections

Total running time of the script: ( 1 minutes 46.249 seconds)

Estimated memory usage: 1916 MB

Gallery generated by Sphinx-Gallery