dreye.ReceptorEstimator.fit_decomposition#

ReceptorEstimator.fit_decomposition(B=None, n_layers=None, mask=None, lbp=0, ubp=1, max_iter=200, init_iter=1000, seed=None, subsample='fast', verbose=0, equal_l1norm_constraint=True, xtol=1e-08, ftol=1e-08, **opt_kwargs)[source]#

Fit source intensities by assigning sources adaptively to independent layers. This is the method used to fit to capture values that describe an image, while using a projector system with fewer subframes than light sources.

Parameters:
Bndarray of shape (n_samples, n_filters)

Relative total capture points. If None, the registered B is used. Defaults to None.

n_layersint, optional

Number of independent layers (or number of subframes). By default None.

maskndarray of shape (n_layers, n_sources), optional

Mask that sets which sources can be on for each independent layer. By default all sources can be on for all layers.

lbpint, optional

Lower bound opacity/intensity for each subframe, by default 0.

ubpint, optional

Upper bound opacity/intensity for each subframe, by default 1.

max_iterint, optional

Maximum number of iterations used during fitting after initialization, by default 200.

init_iterint, optional

Number of iterations used for initial NMF decomposition, by default 1000.

seedint, optional

Seed number, by default None.

subsamplestr or int, optional

Whether to subsample a set of samples during fitting of source intensities. If ‘fast’, 1028 samples are subsampled. If int, then that number of samples is subsampled. If None, no subsampling is performed. By default ‘fast’.

verboseint, optional

Verbosity of the fitting procedure, by default 0.

equal_l1norm_constraintbool, optional

Whether to constrain the source intensities to have the same overall intensity (L1-norm) for each independen layer. By default True.

xtolfloat, optional

Tolerance for termination by the change of the independent variables. Default is 1e-8.

ftol[type], optional

Tolerance for termination by the change of the cost function. Default is 1e-8.

Returns:
selfobject

The ReceptorEstimator object. This is the only thing returned if B is None.

Xndarray of shape (n_layers, n_sources)

Fitted intensity values. Returned if B is not None.

Pndarray of shape (n_samples, n_layers)

Opacity values or intensities for each independent layer. Returned if B is not None.

Bndarray of shape (n_samples, n_filters)

Capture values calculated using the fitted intensity values. Returned if B is not None.