Faces dataset decompositions

Note

This example is adapted from the Scikit-Learn documentation.

Dataset preparation

Loading and preprocessing the Olivetti faces dataset.

import logging

import matplotlib.pyplot as plt
from numpy.random import RandomState

from sklearn import decomposition
from sklearn.datasets import fetch_olivetti_faces

rng = RandomState(0)

# Display progress logs on stdout
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")

faces, _ = fetch_olivetti_faces(return_X_y=True, shuffle=True, random_state=rng)
n_samples, n_features = faces.shape

# Global centering (focus on one feature, centering all samples)
faces_centered = faces - faces.mean(axis=0)

# Local centering (focus on one sample, centering all features)
faces_centered -= faces_centered.mean(axis=1).reshape(n_samples, -1)

print("Dataset consists of %d faces" % n_samples)
downloading Olivetti faces from https://ndownloader.figshare.com/files/5976027 to /home/circleci/scikit_learn_data
Dataset consists of 400 faces

Define a base function to plot the gallery of faces.

n_row, n_col = 2, 3
n_components = n_row * n_col
image_shape = (64, 64)


def plot_gallery(title, images, n_col=n_col, n_row=n_row, cmap=plt.cm.gray):
    fig, axs = plt.subplots(
        nrows=n_row,
        ncols=n_col,
        figsize=(2.0 * n_col, 2.3 * n_row),
        facecolor="white",
        constrained_layout=True,
    )
    fig.get_layout_engine().set(w_pad=0.01, h_pad=0.02, hspace=0, wspace=0)
    fig.set_edgecolor("black")
    fig.suptitle(title, size=16)
    for ax, vec in zip(axs.flat, images):
        vmax = max(vec.max(), -vec.min())
        im = ax.imshow(
            vec.reshape(image_shape),
            cmap=cmap,
            interpolation="nearest",
            vmin=-vmax,
            vmax=vmax,
        )
        ax.axis("off")

    fig.colorbar(im, ax=axs, orientation="horizontal", shrink=0.99, aspect=40, pad=0.01)
    plt.show()

Let’s take a look at our data. Gray color indicates negative values, white indicates positive values.

plot_gallery("Faces from dataset", faces_centered[:n_components])
Faces from dataset

Decomposition

Initialise different estimators for decomposition and fit each of them on all images and plot some results. Each estimator extracts 6 components as vectors \(h \in \mathbb{R}^{4096}\). We just displayed these vectors in human-friendly visualisation as 64x64 pixel images.

Independent components - FastICA

Independent component analysis separates a multivariate vectors into additive subcomponents that are maximally independent.

We instantiate amica.AMICA and call fit.

ica_estimator = decomposition.FastICA(
    n_components=n_components, max_iter=400, whiten="arbitrary-variance", tol=15e-5
)
ica_estimator.fit(faces_centered)
plot_gallery(
    "Independent components - FastICA", ica_estimator.components_[:n_components]
)
Independent components - FastICA

Independent components - AMICA

from amica import AMICA
amica_estimator = AMICA(n_components=n_components, max_iter=400, tol=15e-5)
amica_estimator.fit(faces_centered)
plot_gallery(
    "Independent components - AMICA", amica_estimator.components_[:n_components]
)
Independent components - AMICA
INFO     | getting the mean ... - amica.linalg:pre_whiten
INFO     |  Getting the covariance matrix ... - amica.linalg:pre_whiten
INFO     | doing eigenvalue decomposition for 4096 features ... - amica.linalg:pre_whiten
INFO     | minimum eigenvalues: [-2.0744179e-07 -2.0105490e-07 -1.9943710e-07] - amica.linalg:pre_whiten
INFO     | maximum eigenvalues: [11.265937   6.3150854  4.4085093] - amica.linalg:pre_whiten
INFO     | num eigvals kept: 6 - amica.linalg:pre_whiten
INFO     | Sphering the data... - amica.linalg:pre_whiten
INFO     | numeigs = 6, nw = 6 - amica.linalg:pre_whiten
/home/circleci/project/amica-python/src/amica/linalg.py:342: RuntimeWarning: invalid value encountered in sqrt
  Winv = (eigvecs * np.sqrt(eigvals)) @ eigvecs.T  # Inverse of the whitening matrix
INFO     | 1: block size = 400 - amica.core:solve
INFO     | Solving. (please be patient, this may take a while)... - amica.core:solve
INFO     | Iteration 1, lrate = 0.05000, LL = -2.1700208, nd = 0.1271960, D = 0.00014 0.00014 took 0.08 seconds - amica.core:optimize
INFO     | Iteration 2, lrate = 0.05000, LL = -2.1376741, nd = 0.0409742, D = 0.00016 0.00016 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 3, lrate = 0.05000, LL = -2.1331489, nd = 0.0217302, D = 0.00019 0.00019 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 4, lrate = 0.05000, LL = -2.1318801, nd = 0.0223900, D = 0.00025 0.00025 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 5, lrate = 0.05000, LL = -2.1309907, nd = 0.0227397, D = 0.00035 0.00035 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 6, lrate = 0.05000, LL = -2.1302216, nd = 0.0226398, D = 0.00049 0.00049 took 0.08 seconds - amica.core:optimize
INFO     | Iteration 7, lrate = 0.05000, LL = -2.1295233, nd = 0.0225991, D = 0.00065 0.00065 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 8, lrate = 0.05000, LL = -2.1288759, nd = 0.0225881, D = 0.00083 0.00083 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 9, lrate = 0.05000, LL = -2.1282719, nd = 0.0223885, D = 0.00102 0.00102 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 10, lrate = 0.05000, LL = -2.1277282, nd = 0.0223933, D = 0.00121 0.00121 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 11, lrate = 0.05000, LL = -2.1273334, nd = 0.0221836, D = 0.00140 0.00140 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 12, lrate = 0.05000, LL = -2.1269686, nd = 0.0222701, D = 0.00159 0.00159 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 13, lrate = 0.05000, LL = -2.1266183, nd = 0.0223789, D = 0.00178 0.00178 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 14, lrate = 0.05000, LL = -2.1262785, nd = 0.0225686, D = 0.00196 0.00196 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 15, lrate = 0.05000, LL = -2.1259478, nd = 0.0227617, D = 0.00214 0.00214 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 16, lrate = 0.05000, LL = -2.1256254, nd = 0.0229118, D = 0.00231 0.00231 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 17, lrate = 0.05000, LL = -2.1253104, nd = 0.0230992, D = 0.00247 0.00247 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 18, lrate = 0.05000, LL = -2.1249984, nd = 0.0234481, D = 0.00262 0.00262 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 19, lrate = 0.05000, LL = -2.1246871, nd = 0.0236163, D = 0.00276 0.00276 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 20, lrate = 0.05000, LL = -2.1243814, nd = 0.0236788, D = 0.00290 0.00290 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 21, lrate = 0.05000, LL = -2.1240812, nd = 0.0240091, D = 0.00302 0.00302 took 0.10 seconds - amica.core:optimize
INFO     | Iteration 22, lrate = 0.05000, LL = -2.1237806, nd = 0.0244042, D = 0.00314 0.00314 took 0.08 seconds - amica.core:optimize
INFO     | Iteration 23, lrate = 0.05000, LL = -2.1234779, nd = 0.0248759, D = 0.00325 0.00325 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 24, lrate = 0.05000, LL = -2.1231719, nd = 0.0252579, D = 0.00336 0.00336 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 25, lrate = 0.05000, LL = -2.1228634, nd = 0.0255228, D = 0.00347 0.00347 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 26, lrate = 0.05000, LL = -2.1225560, nd = 0.0256722, D = 0.00359 0.00359 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 27, lrate = 0.05000, LL = -2.1222484, nd = 0.0256868, D = 0.00369 0.00369 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 28, lrate = 0.05000, LL = -2.1219390, nd = 0.0261290, D = 0.00378 0.00378 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 29, lrate = 0.05000, LL = -2.1216269, nd = 0.0264438, D = 0.00387 0.00387 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 30, lrate = 0.05000, LL = -2.1213107, nd = 0.0268607, D = 0.00397 0.00397 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 31, lrate = 0.05000, LL = -2.1209905, nd = 0.0272210, D = 0.00406 0.00406 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 32, lrate = 0.05000, LL = -2.1206632, nd = 0.0277270, D = 0.00415 0.00415 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 33, lrate = 0.05000, LL = -2.1203264, nd = 0.0282663, D = 0.00425 0.00425 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 34, lrate = 0.05000, LL = -2.1199804, nd = 0.0284789, D = 0.00435 0.00435 took 0.10 seconds - amica.core:optimize
INFO     | Iteration 35, lrate = 0.05000, LL = -2.1196419, nd = 0.0290689, D = 0.00445 0.00445 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 36, lrate = 0.05000, LL = -2.1193005, nd = 0.0295202, D = 0.00455 0.00455 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 37, lrate = 0.05000, LL = -2.1189670, nd = 0.0295793, D = 0.00467 0.00467 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 38, lrate = 0.05000, LL = -2.1186346, nd = 0.0300021, D = 0.00477 0.00477 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 39, lrate = 0.05000, LL = -2.1183014, nd = 0.0304127, D = 0.00488 0.00488 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 40, lrate = 0.05000, LL = -2.1179635, nd = 0.0308068, D = 0.00501 0.00501 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 41, lrate = 0.05000, LL = -2.1176211, nd = 0.0304620, D = 0.00516 0.00516 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 42, lrate = 0.05000, LL = -2.1172856, nd = 0.0302834, D = 0.00529 0.00529 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 43, lrate = 0.05000, LL = -2.1169498, nd = 0.0306123, D = 0.00542 0.00542 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 44, lrate = 0.05000, LL = -2.1166082, nd = 0.0309810, D = 0.00557 0.00557 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 45, lrate = 0.05000, LL = -2.1162595, nd = 0.0311330, D = 0.00573 0.00573 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 46, lrate = 0.05000, LL = -2.1159120, nd = 0.0308892, D = 0.00589 0.00589 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 47, lrate = 0.05000, LL = -2.1155601, nd = 0.0312777, D = 0.00604 0.00604 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 48, lrate = 0.05000, LL = -2.1152038, nd = 0.0311884, D = 0.00620 0.00620 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 49, lrate = 0.05000, LL = -2.1148445, nd = 0.0313530, D = 0.00633 0.00633 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 50, lrate = 0.05000, LL = -2.1144851, nd = 0.0151374, D = 0.00649 0.00649 took 0.01 seconds - amica.core:optimize
INFO     | Starting Newton ... setting numdecs to 0 - amica.core:optimize
INFO     | Iteration 51, lrate = 0.10000, LL = -2.1141426, nd = 0.0151223, D = 0.00649 0.00649 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 52, lrate = 0.20000, LL = -2.1135205, nd = 0.0148668, D = 0.00652 0.00652 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 53, lrate = 0.30000, LL = -2.1126125, nd = 0.0144834, D = 0.00661 0.00661 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 54, lrate = 0.40000, LL = -2.1114393, nd = 0.0141273, D = 0.00681 0.00681 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 55, lrate = 0.50000, LL = -2.1099742, nd = 0.0136557, D = 0.00707 0.00707 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 56, lrate = 0.60000, LL = -2.1082953, nd = 0.0121796, D = 0.00752 0.00752 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 57, lrate = 0.70000, LL = -2.1065705, nd = 0.0110367, D = 0.00800 0.00800 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 58, lrate = 0.80000, LL = -2.1050232, nd = 0.0092525, D = 0.00775 0.00775 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 59, lrate = 0.90000, LL = -2.1036545, nd = 0.0086716, D = 0.00743 0.00743 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 60, lrate = 1.00000, LL = -2.1022907, nd = 0.0084008, D = 0.00738 0.00738 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 61, lrate = 1.00000, LL = -2.1009603, nd = 0.0082169, D = 0.00727 0.00727 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 62, lrate = 1.00000, LL = -2.0996153, nd = 0.0078565, D = 0.00721 0.00721 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 63, lrate = 1.00000, LL = -2.0983546, nd = 0.0079388, D = 0.00727 0.00727 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 64, lrate = 1.00000, LL = -2.0971226, nd = 0.0076823, D = 0.00695 0.00695 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 65, lrate = 1.00000, LL = -2.0959956, nd = 0.0073776, D = 0.00682 0.00682 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 66, lrate = 1.00000, LL = -2.0949488, nd = 0.0070564, D = 0.00668 0.00668 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 67, lrate = 1.00000, LL = -2.0940055, nd = 0.0064572, D = 0.00670 0.00670 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 68, lrate = 1.00000, LL = -2.0931728, nd = 0.0061136, D = 0.00698 0.00698 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 69, lrate = 1.00000, LL = -2.0924121, nd = 0.0055997, D = 0.00733 0.00733 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 70, lrate = 1.00000, LL = -2.0917554, nd = 0.0050074, D = 0.00770 0.00770 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 71, lrate = 1.00000, LL = -2.0911455, nd = 0.0050727, D = 0.00824 0.00824 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 72, lrate = 1.00000, LL = -2.0905162, nd = 0.0050499, D = 0.00870 0.00870 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 73, lrate = 1.00000, LL = -2.0898787, nd = 0.0050021, D = 0.00931 0.00931 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 74, lrate = 1.00000, LL = -2.0892790, nd = 0.0049499, D = 0.00973 0.00973 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 75, lrate = 1.00000, LL = -2.0886910, nd = 0.0049645, D = 0.01026 0.01026 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 76, lrate = 1.00000, LL = -2.0881035, nd = 0.0048458, D = 0.01062 0.01062 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 77, lrate = 1.00000, LL = -2.0875025, nd = 0.0049676, D = 0.01099 0.01099 took 0.08 seconds - amica.core:optimize
INFO     | Iteration 78, lrate = 1.00000, LL = -2.0868903, nd = 0.0050177, D = 0.01113 0.01113 took 0.02 seconds - amica.core:optimize
INFO     | Iteration 79, lrate = 1.00000, LL = -2.0862782, nd = 0.0049321, D = 0.01096 0.01096 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 80, lrate = 1.00000, LL = -2.0856829, nd = 0.0048449, D = 0.01093 0.01093 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 81, lrate = 1.00000, LL = -2.0850652, nd = 0.0044695, D = 0.01068 0.01068 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 82, lrate = 1.00000, LL = -2.0845011, nd = 0.0041589, D = 0.01040 0.01040 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 83, lrate = 1.00000, LL = -2.0840006, nd = 0.0041101, D = 0.01004 0.01004 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 84, lrate = 1.00000, LL = -2.0835030, nd = 0.0041345, D = 0.00963 0.00963 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 85, lrate = 1.00000, LL = -2.0829965, nd = 0.0041267, D = 0.00931 0.00931 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 86, lrate = 1.00000, LL = -2.0824867, nd = 0.0041112, D = 0.00897 0.00897 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 87, lrate = 1.00000, LL = -2.0819787, nd = 0.0041067, D = 0.00856 0.00856 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 88, lrate = 1.00000, LL = -2.0814660, nd = 0.0041574, D = 0.00831 0.00831 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 89, lrate = 1.00000, LL = -2.0809470, nd = 0.0041208, D = 0.00807 0.00807 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 90, lrate = 1.00000, LL = -2.0804398, nd = 0.0037585, D = 0.00788 0.00788 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 91, lrate = 1.00000, LL = -2.0800186, nd = 0.0031894, D = 0.00766 0.00766 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 92, lrate = 1.00000, LL = -2.0796624, nd = 0.0029996, D = 0.00742 0.00742 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 93, lrate = 1.00000, LL = -2.0793148, nd = 0.0029203, D = 0.00733 0.00733 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 94, lrate = 1.00000, LL = -2.0789712, nd = 0.0028460, D = 0.00719 0.00719 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 95, lrate = 1.00000, LL = -2.0786260, nd = 0.0027510, D = 0.00720 0.00720 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 96, lrate = 1.00000, LL = -2.0783604, nd = 0.0027274, D = 0.00706 0.00706 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 97, lrate = 1.00000, LL = -2.0781020, nd = 0.0028993, D = 0.00713 0.00713 took 0.10 seconds - amica.core:optimize
INFO     | Iteration 98, lrate = 1.00000, LL = -2.0778556, nd = 0.0029404, D = 0.00689 0.00689 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 99, lrate = 1.00000, LL = -2.0775898, nd = 0.0028311, D = 0.00722 0.00722 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 100, lrate = 1.00000, LL = -2.0773648, nd = 0.0024970, D = 0.00720 0.00720 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 101, lrate = 1.00000, LL = -2.0772106, nd = 0.0026197, D = 0.00720 0.00720 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 102, lrate = 1.00000, LL = -2.0770921, nd = 0.0027996, D = 0.00720 0.00720 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 103, lrate = 1.00000, LL = -2.0769819, nd = 0.0029622, D = 0.00720 0.00720 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 104, lrate = 1.00000, LL = -2.0768789, nd = 0.0031006, D = 0.00720 0.00720 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 105, lrate = 1.00000, LL = -2.0767825, nd = 0.0032295, D = 0.00720 0.00720 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 106, lrate = 1.00000, LL = -2.0766925, nd = 0.0033332, D = 0.00720 0.00720 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 107, lrate = 1.00000, LL = -2.0764662, nd = 0.0028088, D = 0.00748 0.00748 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 108, lrate = 1.00000, LL = -2.0762574, nd = 0.0026534, D = 0.00759 0.00759 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 109, lrate = 1.00000, LL = -2.0760551, nd = 0.0024676, D = 0.00788 0.00788 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 110, lrate = 1.00000, LL = -2.0758624, nd = 0.0023830, D = 0.00781 0.00781 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 111, lrate = 1.00000, LL = -2.0756712, nd = 0.0024787, D = 0.00814 0.00814 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 112, lrate = 1.00000, LL = -2.0754952, nd = 0.0025442, D = 0.00821 0.00821 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 113, lrate = 1.00000, LL = -2.0753100, nd = 0.0023592, D = 0.00858 0.00858 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 114, lrate = 1.00000, LL = -2.0751373, nd = 0.0022740, D = 0.00868 0.00868 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 115, lrate = 1.00000, LL = -2.0749811, nd = 0.0024812, D = 0.00949 0.00949 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 116, lrate = 1.00000, LL = -2.0748218, nd = 0.0022574, D = 0.00928 0.00928 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 117, lrate = 1.00000, LL = -2.0746542, nd = 0.0022921, D = 0.01009 0.01009 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 118, lrate = 1.00000, LL = -2.0744842, nd = 0.0023502, D = 0.00998 0.00998 took 0.00 seconds - amica.core:optimize
INFO     | Iteration 119, lrate = 1.00000, LL = -2.0743275, nd = 0.0021496, D = 0.01054 0.01054 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 120, lrate = 1.00000, LL = -2.0741918, nd = 0.0022760, D = 0.00994 0.00994 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 121, lrate = 1.00000, LL = -2.0740518, nd = 0.0021705, D = 0.01052 0.01052 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 122, lrate = 1.00000, LL = -2.0739284, nd = 0.0020061, D = 0.01010 0.01010 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 123, lrate = 1.00000, LL = -2.0738078, nd = 0.0014589, D = 0.01027 0.01027 took 0.09 seconds - amica.core:optimize
INFO     | Iteration 124, lrate = 1.00000, LL = -2.0736811, nd = 0.0014893, D = 0.01027 0.01027 took 0.01 seconds - amica.core:optimize
INFO     | Iteration 125, lrate = 1.00000, LL = -2.0735573, nd = 0.0014979, D = 0.01036 0.01036 took 0.01 seconds - amica.core:optimize
INFO     | Exiting because likelihood increasing by less than 0.00015 for more than 5 iterations ... - amica.core:optimize
INFO     | Finished in 3.99 seconds - amica.core:optimize

Total running time of the script: (6 minutes 15.888 seconds)

Gallery generated by Sphinx-Gallery