Analysis (pylorenzmie.analysis)#

Hologram#

Normalized hologram image with pixel coordinates.

class pylorenzmie.analysis.Hologram.Hologram(data, corner=(0.0, 0.0))[source]#

Bases: object

Normalized hologram paired with pixel coordinates.

Parameters:
  • data (numpy.ndarray) – Normalized hologram, shape (ny, nx). Pixel values should be floating-point intensities normalized so the background level is approximately 1 (i.e. I(r) / I_0(r)).

  • corner (tuple[float, float], optional) – (left, top) pixel coordinates of the top-left corner of this image within the full camera frame. Default: (0., 0.).

Notes

Pixel coordinates are generated automatically from data.shape and corner via meshgrid() and stored as a (2, ny, nx) array. Two flat views are provided for use by scattering models and numerical solvers:

Both are numpy views (no copy, O(1)).

Coordinate-aware cropping:

crop = hologram[y0:y1, x0:x1]

returns a new Hologram whose corner is updated so that its coordinates are consistent with those of the parent frame.

data: NDArray[float] | NDArray[int]#
corner: tuple[float, float] = (0.0, 0.0)#
property shape: tuple[int, int]#

Image dimensions (ny, nx).

property coordinates: NDArray[float]#

Pixel coordinates, shape (2, ny, nx).

property flat_data: NDArray[float]#

Pixel values as a 1-D view, shape (npts,).

property flat_coordinates: NDArray[float]#

Pixel coordinates as a 2-D view, shape (2, npts).

classmethod example()[source]#
Return type:

None

Mask#

class pylorenzmie.analysis.Mask.Mask(shape=None, fraction=0.1, exclude=None)[source]#

Bases: LMObject

Pixel selection mask for subsampling a hologram during fitting.

Randomly selects a fraction of pixels for analysis, with optional exclusion of saturated, NaN, or infinite pixels. Regenerates automatically whenever shape, fraction, or exclude is changed.

Inherits from pylorenzmie.lib.LMObject.

Parameters:
  • shape (tuple[int, int], optional) – (height, width) of the image. Default: None.

  • fraction (float, optional) – Fraction of pixels to include. Default: 0.1.

  • exclude (numpy.ndarray of bool, optional) – Boolean array of pixels to force-exclude. Default: None.

Notes

Call update() to resample the mask without changing any parameter. Subclasses may override _select() to implement non-uniform sampling strategies.

References

  1. T. G. Dimiduk, R. W. Perry, J. Fung and V. N. Manoharan, “Random-subset fitting of digital holograms for fast three-dimensional particle tracking,” Applied Optics 53, G177–G183 (2014).

shape: tuple[int, int] | None = None#
fraction: float = 0.1#
exclude: NDArray[bool] | None = None#
property properties: dict[str, bool | int | float | str]#

fraction of pixels to sample.

Type:

Mask configuration

update()[source]#

Regenerate the mask with the current parameters.

Return type:

None

apply(hologram)[source]#

Apply mask to a hologram, returning flat data and coordinates.

This is the explicit 2D-to-flat boundary for numerical solvers.

Parameters:

hologram (Hologram) – Normalized hologram to subsample.

Return type:

tuple[GenericAlias[float] | GenericAlias[int], GenericAlias[float]]

Returns:

  • data (numpy.ndarray) – Selected pixel values, shape (nselected,).

  • coordinates (numpy.ndarray) – Selected pixel coordinates, shape (2, nselected).

Notes

Each call draws a fresh random subsample from hologram.shape.

classmethod example()[source]#
Return type:

None

RadialMask#

class pylorenzmie.analysis.RadialMask.RadialMask(shape=None, fraction=0.1, exclude=None)[source]#

Bases: Mask

Pixel selection mask with radially-weighted sampling probability.

Overrides Mask._select() to sample pixels with a probability that varies with radial distance from the image center.

When fraction < 0.5 the image center has probability zero of being selected; probability increases toward the edges, emphasizing the outer ring fringes of a holographic pattern. When fraction >= 0.5 all pixels have a nonzero selection probability; the distribution becomes more uniform as fraction → 1.

Inherits all parameters from Mask.

Localizer#

class pylorenzmie.analysis.Localizer.Localizer(diameter=31, nfringes=20)[source]#

Bases: LMObject

Detect and localize holographic features in a normalized image.

Uses CircleTransform to enhance ring-like patterns, then calls trackpy.locate() to find feature centers. Bounding boxes are sized to enclose a specified number of fringes.

Inherits from pylorenzmie.lib.LMObject.

Parameters:
  • diameter (int, optional) – Nominal feature diameter passed to trackpy.locate [pixels]. Default: 31.

  • nfringes (int, optional) – Number of interference fringes to enclose in each bounding box. Default: 20.

property properties: dict[str, bool | int | float | str]#

nfringes and diameter.

Type:

Localization parameters

localize(image, diameter=None, nfringes=None, **kwargs)[source]#

Localize features in a normalized holographic microscopy image.

Parameters:
  • image (numpy.ndarray or list of numpy.ndarray) – Normalized hologram intensity.

  • diameter (int, optional) – Override diameter for this call.

  • nfringes (int, optional) – Override nfringes for this call.

  • **kwargs – Additional keyword arguments passed to trackpy.locate.

Return type:

DataFrame

Returns:

predictions (pandas.DataFrame) – Columns: x_p, y_p, bbox. bbox is ((x0, y0), width, height).

detect(image, diameter=None, nfringes=None, **kwargs)#

Localize features in a normalized holographic microscopy image.

Parameters:
  • image (numpy.ndarray or list of numpy.ndarray) – Normalized hologram intensity.

  • diameter (int, optional) – Override diameter for this call.

  • nfringes (int, optional) – Override nfringes for this call.

  • **kwargs – Additional keyword arguments passed to trackpy.locate.

Return type:

DataFrame

Returns:

predictions (pandas.DataFrame) – Columns: x_p, y_p, bbox. bbox is ((x0, y0), width, height).

crop(image, bbox)[source]#

Crop an image to a bounding box.

Parameters:
  • image (numpy.ndarray) – Full-frame image.

  • bbox (tuple) – ((x0, y0), width, height).

Return type:

GenericAlias[float] | GenericAlias[int]

Returns:

cropped (numpy.ndarray) – Sub-image of shape (height, width).

classmethod example()[source]#
Return type:

None

BaseEstimator#

Abstract base class for hologram parameter estimators.

class pylorenzmie.analysis.BaseEstimator.BaseEstimator[source]#

Bases: LMObject

Abstract base for particle parameter estimators.

Subclasses must implement estimate() and the properties getter inherited from LMObject.

See also

Estimator

conventional azimuthal-profile estimator.

DEEstimator

global differential-evolution estimator.

abstractmethod estimate(hologram)[source]#

Estimate particle parameters from a normalized hologram.

Parameters:

hologram (Hologram) – Normalized hologram crop to analyze.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Estimated particle properties.

Estimator#

class pylorenzmie.analysis.Estimator.Estimator(instrument, n_p=1.5, k_p=0.0)[source]#

Bases: BaseEstimator

Estimate initial parameters of a holographic feature.

Uses the azimuthal average of a cropped hologram to estimate the axial position and radius of the scattering particle, providing initial values for Optimizer.

Inherits from BaseEstimator.

Parameters:
  • instrument (Instrument) – Optical parameters of the microscope.

  • n_p (float, optional) – Particle refractive index. Default: 1.5. Cannot be estimated from the azimuthal profile; serves as an initial value for the optimizer.

  • k_p (float, optional) – Imaginary part of the refractive index. Default: 0.

Notes

Call estimate() to populate all particle parameters. Results are available via properties afterwards.

predict() is a backward-compatibility alias for estimate().

This class provides a lightweight conventional-algorithm baseline. For higher-quality initial estimates — including n_p — use the CATCH deep neural network model [1] [2].

References

instrument: Instrument#
n_p: float = 1.5#
k_p: float = 0.0#
property properties: dict[str, bool | int | float | str]#

Estimated particle properties.

estimate(hologram)[source]#

Estimate particle properties from a normalized hologram.

Parameters:

hologram (Hologram) – Normalized hologram crop.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Estimated particle properties.

classmethod example()[source]#
Return type:

None

DEEstimator#

class pylorenzmie.analysis.DEEstimator.DEEstimator(model, bounds=<factory>, fraction=0.02, exclude=None, popsize=10, seed=None, settings=<factory>)[source]#

Bases: BaseEstimator

Estimate initial particle parameters by global search.

Uses differential evolution (DE) to minimize the sum-squared residual between the forward model and a subsampled hologram crop, providing robust initial values for Optimizer even when the conventional Estimator fails to converge.

Inherits from BaseEstimator.

Parameters:
  • model (LorenzMie) – Generative scattering model shared with Optimizer. The particle parameters on this model are updated in-place.

  • bounds (dict, optional) – Mapping of parameter name to (min, max) search range. Default: z_p (10, 600) pixels, a_p (0.25, 10.0) μm, n_p (1.0, 3.0).

  • fraction (float, optional) – Fraction of pixels used for the DE objective function. Default: 0.02. A fixed random subsample is drawn once per call and held constant throughout the search so the objective is deterministic.

  • exclude (numpy.ndarray of bool, optional) – Boolean mask of pixels to force-exclude from sampling (e.g. saturated or dead pixels). Default: None (no exclusions). Set via mask when using Feature.

  • popsize (int, optional) – DE population size multiplier (population = popsize × len(bounds)). Default: 10.

  • seed (int or None, optional) – Random seed passed to scipy.optimize.differential_evolution() for reproducibility. Default: None.

Notes

x_p and y_p are pinned to the pixel-coordinate means before the search begins; only the parameters listed in bounds are varied.

For large particles (a_p ≳ 1 μm) the hologram fringe pattern is dense and the coarsely-sampled objective function becomes multi-modal. In that regime increase fraction (e.g. 0.05) and popsize (e.g. 15) at the cost of longer run time, or supply tighter bounds to reduce the search volume.

The model coordinates are temporarily overridden during the search and restored on exit, even if an exception occurs.

By default settings['workers'] = -1 distributes candidate evaluations across all CPU cores via multiprocessing. On Linux (fork start method) the speedup is near-linear with core count at negligible overhead. On macOS (spawn start method) each estimate() call pays a process-pool startup cost; on machines with many cores this is still a net win (~2× on a 10-core Mac). Set workers=1 to disable parallelism, e.g. when using cupyLorenzMie (which holds GPU memory and is not picklable). The companion setting updating='deferred' (also the default) is required for workers != 1 and suppresses a SciPy warning.

Use Estimator for a fast conventional estimate when the fringe pattern is clean. Use DEEstimator when the conventional estimator produces starting points too far from the true solution for Optimizer to converge.

model: jaxLorenzMie#
bounds: dict#
fraction: float = 0.02#
exclude: NDArray[bool] | None = None#
popsize: int = 10#
seed: int | None = None#
settings: dict#
property properties: dict[str, bool | int | float | str]#

DEEstimator configuration.

estimate(hologram)[source]#

Estimate particle parameters by differential evolution.

Parameters:

hologram (Hologram) – Normalized hologram crop to analyze.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Estimated particle properties (same keys as properties).

classmethod example()[source]#
Return type:

None

RadialEstimator#

Global parameter estimator using the azimuthal radial profile.

class pylorenzmie.analysis.RadialEstimator.RadialEstimator(model, bounds=<factory>, popsize=10, seed=None, settings=<factory>)[source]#

Bases: BaseEstimator

Estimate particle parameters by global search on the azimuthal profile.

Computes the azimuthal average of the hologram once, then uses differential evolution (DE) to find the parameter set that minimises the residual between a 1-D radial model evaluation and that profile.

Because a sphere’s hologram is rotationally symmetric, the full 2-D pixel comparison in DEEstimator can be reduced to a 1-D radial comparison with no loss of information about z_p, a_p, or n_p. This makes each DE objective evaluation roughly an order of magnitude cheaper than DEEstimator while retaining the robustness of global search and adding n_p estimation that Estimator cannot provide.

Inherits from BaseEstimator.

Parameters:
  • model (LorenzMie) – Generative scattering model shared with Optimizer. The particle parameters on this model are updated in-place.

  • bounds (dict, optional) – Mapping of parameter name to (min, max) search range. Default: z_p (10, 600) pixels, a_p (0.25, 10.0) μm, n_p (1.0, 3.0).

  • popsize (int, optional) – DE population size multiplier (population = popsize × len(bounds)). Default: 10.

  • seed (int or None, optional) – Random seed for scipy.optimize.differential_evolution(). Default: None.

Notes

x_p and y_p are pinned to the pixel-coordinate means before the search begins; only the parameters listed in bounds are varied.

The model coordinates are temporarily replaced by a 1-D radial spoke (x_p + r, y_p) for r = 0, 1, …, n_radii - 1 and restored on exit, even if an exception occurs.

This estimator assumes the hologram is rotationally symmetric about the particle position, which holds for spherical particles. For non-spherical scatterers use DEEstimator instead.

The default settings['workers'] = 1 is appropriate here because each objective evaluation is inexpensive (~100 model points vs ~1000–2000 for DEEstimator). Set workers=-1 to distribute over all cores if you are running very large population sizes or tight tolerances.

Use Estimator for a fast conventional estimate when the fringe pattern is clean and n_p is known. Use this class when you need a robust estimate of n_p as well as z_p and a_p. Use DEEstimator for non-spherical particles or when rotational symmetry cannot be assumed.

model: jaxLorenzMie#
bounds: dict#
popsize: int = 10#
seed: int | None = None#
settings: dict#
property properties: dict[str, bool | int | float | str]#

RadialEstimator configuration.

estimate(hologram)[source]#

Estimate particle parameters from the azimuthal radial profile.

Parameters:

hologram (Hologram) – Normalized hologram crop to analyze.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Estimated particle properties (same keys as properties).

classmethod example()[source]#
Return type:

None

MLPEstimator#

Fast parameter estimator using a pre-trained radial-profile MLP.

class pylorenzmie.analysis.MLPEstimator.MLPEstimator(model, weights=<factory>, n_features=100)[source]#

Bases: BaseEstimator

Fast particle parameter estimator using a pre-trained MLP.

Computes the azimuthal average of the hologram, pads or truncates it to a fixed length, and runs a single forward pass through a scikit-learn MLPRegressor to predict z_p, a_p, and n_p in one shot. Inference takes < 1 ms regardless of image size.

The MLP was trained on synthetic radial profiles generated by the 1-D radial trick: LorenzMie evaluated at (r, 0) for r = 0 .. n_features-1, which equals the azimuthal average for a rotationally symmetric scatterer. Parameters are drawn log-uniformly over z_p ∈ [20, 500] px, a_p ∈ [0.2, 4] μm and uniformly over n_p ∈ [1.3, 2.5]. Each profile is randomly truncated during training so the network handles both large and small crops gracefully. Pre-trained weights cover the default instrument (447 nm laser, 0.048 μm/px, water). Retrain with devel/train_mlp_estimator.py for other configurations.

Inherits from BaseEstimator.

Parameters:
  • model (LorenzMie) – Generative scattering model shared with Optimizer. Particle parameters are updated in-place on each estimate() call; instrument parameters are read but not modified.

  • weights (Path or str, optional) – Path to a joblib-serialized scikit-learn Pipeline (StandardScalerTransformedTargetRegressor(MLPRegressor)). Default: the pre-trained weights bundled with the package.

  • n_features (int, optional) – Fixed input length passed to the MLP. Must match the value used during training. Default: 100.

Notes

x_p and y_p are pinned to the pixel-coordinate means of the hologram (same convention as DEEstimator and RadialEstimator).

The profile from avg() is truncated to the first n_features values. Positions beyond the profile end are padded with 0.0 — a sentinel that is clearly outside the normalised hologram range (which is positive and O(1)). The training data uses the same sentinel after random truncation, so the network has seen this pattern and uses the zero tail to infer crop size.

Predicted values are clipped to the training bounds before being written to the model; the Optimizer will refine them further.

model: jaxLorenzMie#
weights: Path#
n_features: int = 100#
property properties: dict[str, bool | int | float | str]#

MLPEstimator configuration.

estimate(hologram)[source]#

Estimate particle parameters from the azimuthal radial profile.

Parameters:

hologram (Hologram) – Normalised hologram crop to analyse.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Estimated particle properties (same keys as properties).

classmethod example()[source]#
Return type:

None

Optimizer#

class pylorenzmie.analysis.Optimizer.Optimizer(model=None, mask=None, robust=False, fixed=None, settings=None, **kwargs)[source]#

Bases: LMObject

Fit a generative light-scattering model to holographic data.

Wraps scipy.optimize.least_squares(). The method class attribute must appear as a substring of the model’s method string for the pairing to be valid (e.g. 'numpy' matches both 'numpy' and 'cupy numpy').

Parameters:
  • model (LorenzMie, optional) – Generative scattering model. Default: LorenzMie().

  • mask (Mask or None, optional) – Pixel-selection mask applied to the hologram before fitting. None (default) uses all pixels via flat_data and flat_coordinates.

  • robust (bool, optional) – Use robust Cauchy loss instead of standard least squares. Default: False.

  • fixed (list[str], optional) – Names of model properties held constant during fitting. Default: all instrument parameters plus k_p (wavelength, magnification, numerical_aperture, n_m, noise, k_p), leaving only the five particle parameters (x_p, y_p, z_p, a_p, n_p) free.

  • settings (dict, optional) – Keyword arguments forwarded to scipy.optimize.least_squares. Defaults to sensible values for holographic particle fitting.

  • **kwargs – Forwarded to LorenzMie() when model is not supplied.

result#

Fitted values and uncertainties after optimize() has run; None before the first call.

Type:

pandas.Series or None

metadata#

Fixed model properties and optimizer settings.

Type:

pandas.Series

method: str = 'numpy'#
property properties: dict[str, bool | int | float | str]#

settings and fixed parameter list.

Type:

Optimizer configuration

property settings: dict[str, bool | int | float | str]#

Settings forwarded to scipy.optimize.least_squares.

Notes

method: 'lm' (Levenberg-Marquardt, default), 'trf', or 'dogbox'. Only 'lm' supports loss='linear'.

loss: 'linear' (standard LS), 'cauchy', 'huber', 'soft_l1', or 'arctan'.

x_scale: 'jac' for dynamic rescaling, or an explicit array of scales matched to the free parameters.

property robust: bool#

True if using robust (non-linear loss) optimization.

property fraction: float#

Fraction of pixels used for fitting.

Setting this creates a Mask if one does not exist. 1.0 (all pixels) when no mask is set.

property fixed: list[str]#

Model properties held constant during fitting.

property variables: list[str]#

Model properties that will be optimized.

property result: Series | None#

Fitted values, uncertainties, and statistics.

Returns None before optimize() has been called. Each fitted parameter p appears alongside d``+``p (its uncertainty). Also includes success, npix, and redchi.

property metadata: Series#

Fixed model properties and optimizer settings.

optimize(hologram)[source]#

Fit model to hologram.

Parameters:

hologram (Hologram) – Normalized hologram to fit. When mask is None all pixels are used; otherwise the mask subsamples the hologram before fitting.

Return type:

Series | DataFrame

Returns:

result (pandas.Series) – Fitted values, uncertainties, and goodness-of-fit statistics.

report()[source]#

Format fitting results as a human-readable string.

Return type:

str

Returns:

str – One line per fitted parameter showing value ± uncertainty, followed by pixel count and reduced chi-squared.

classmethod example(verbose=False, **kwargs)[source]#
Return type:

None

cupyOptimizer#

class pylorenzmie.analysis.cupyOptimizer.cupyOptimizer(*args, double_precision=True, **kwargs)[source]#

Bases: Optimizer

GPU-accelerated optimizer using CuPy.

Subclass of Optimizer that keeps hologram computation and residual evaluation on the GPU. Only the final residual vector is transferred to the CPU for scipy’s Levenberg-Marquardt solver.

Inherits from Optimizer.

Parameters:
  • double_precision (bool, optional) – If True (default), use double-precision arithmetic on the GPU.

  • *args, **kwargs – Passed to Optimizer.

Notes

The method attribute is 'cupy', which is a substring of cupyLorenzMie.method = 'cupy numpy', satisfying the optimizer compatibility check.

method: str = 'cupy'#
property data#

Feature#

class pylorenzmie.analysis.Feature.Feature(hologram, model=None, fixed=None)[source]#

Bases: Hologram

A holographic feature associated with a single particle.

A Feature is a Hologram of a single particle augmented with an estimator and optimizer for localizing and characterizing the particle.

Parameters:
  • hologram (Hologram) – Normalized hologram crop with pixel coordinates.

  • model (LorenzMie, optional) – Generative scattering model. Default: LorenzMie().

  • fixed (list[str], optional) – Model properties held constant during fitting. Default: the Optimizer default.

property mask: Mask#

Shared pixel exclusion mask for estimator and optimizer.

Bad pixels (saturated, dead) set via exclude are excluded from both the DE estimation and the LM optimization. Each component controls its own pixel fraction independently.

property particle: Particle#

Particle associated with the scattering model.

property model: jaxLorenzMie#

Generative scattering model.

estimate()[source]#

Estimate initial particle parameters from the hologram crop.

Return type:

Series

Returns:

properties (pandas.Series) – Estimated particle properties.

optimize()[source]#

Optimize particle parameters to fit the hologram crop.

Return type:

Series

Returns:

result (pandas.Series) – Fitted values, uncertainties, and goodness-of-fit statistics.

Notes

When a mask with fraction < 1.0 is set, a fresh random pixel subsample is drawn on every call.

predicted()[source]#

Hologram predicted by the current model over all pixels.

Return type:

GenericAlias[float] | GenericAlias[int]

Returns:

predicted (numpy.ndarray) – Predicted intensity, same shape as this Feature.

residuals()[source]#

Difference between the predicted hologram and the data.

Return type:

GenericAlias[float] | GenericAlias[int]

Returns:

residuals (numpy.ndarray) – predicted() - data, same shape as this Feature.

classmethod example()[source]#
Return type:

None

Frame#

class pylorenzmie.analysis.Frame.Frame(data=None, corner=(0.0, 0.0), instrument=None, localizer=None)[source]#

Bases: Hologram

Full-frame holographic microscopy analysis pipeline.

A Frame is a Hologram of the full camera field, augmented with a Localizer and a shared Instrument. Slicing a Frame returns a Feature with the correct corner coordinates and instrument already attached.

Parameters:
  • data (numpy.ndarray, optional) – Normalized hologram. Setting data clears previous results. Default: None.

  • corner (tuple[float, float], optional) – Top-left corner of this image within the full camera frame. Default: (0., 0.).

  • instrument (Instrument, optional) – Microscope parameters shared by all features. Default: Instrument().

  • localizer (Localizer, optional) – Feature detection backend. Default: Localizer().

features#

Feature objects created by the most recent detect() call.

Type:

list[Feature]

bboxes#

Bounding boxes ((x0, y0), w, h) for current features.

Type:

list

results#

Optimized parameters from the most recent optimize() or analyze() call.

Type:

pandas.DataFrame

property data: NDArray[float] | NDArray[int] | None#

Normalized hologram intensity.

property shape: tuple[int, int]#

Image dimensions (ny, nx), or (0, 0) if no data.

property results: Series | DataFrame | list[Series | DataFrame]#

Optimized parameters from the most recent fit.

property features: list[Feature]#

Features detected in the current frame.

property bboxes: list#

Bounding boxes of current features, each ((x0, y0), w, h).

detect()[source]#

Detect and localize features in data.

Return type:

int

Returns:

nfeatures (int) – Number of features found.

estimate()[source]#

Estimate parameters for all current features.

Return type:

None

optimize()[source]#

Optimize parameters for all current features.

Return type:

Series | DataFrame | list[Series | DataFrame]

Returns:

results (pandas.DataFrame) – Fitted values, uncertainties, and goodness-of-fit for each feature.

analyze(data=None)[source]#

Detect features, estimate parameters, and optimize fits.

Parameters:

data (numpy.ndarray, optional) – Normalized hologram. Updates data if provided.

Return type:

Series | DataFrame | list[Series | DataFrame]

Returns:

results (pandas.DataFrame) – Optimized parameters of the generative model for each detected feature.

classmethod example()[source]#
Return type:

None

Trajectory#

class pylorenzmie.analysis.Trajectory.Trajectory[source]#

Bases: LMObject

Accumulate per-frame characterization results over time.

Each call to append() stores one frame’s worth of Frame output. data returns the combined time series as a single pandas.DataFrame.

Inherits from pylorenzmie.lib.LMObject.

property properties: dict[str, bool | int | float | str]#

Adjustable parameters of this object.

Returns a flat dict mapping parameter names to their current values. Only parameters included here are visible to the serialization methods and to Optimizer during fitting.

Subclasses must override the getter using:

@ParentClass.properties.getter
def properties(self) -> Properties:
    props = super().properties
    props.update(...)
    return props

The base-class getter returns an empty dict; the base-class setter iterates over the supplied dict and calls setattr for every key that already exists as an attribute. Unknown keys are silently ignored and logged at DEBUG level.

property data: DataFrame#

All results concatenated into a single DataFrame.

append(results)[source]#

Append one frame of results.

Parameters:

results (pandas.DataFrame or pandas.Series) – Output from Frame.optimize() or Frame.analyze().

Return type:

None

clear()[source]#

Remove all stored results.

Return type:

None

to_csv(path, **kwargs)[source]#

Write accumulated results to a CSV file.

Parameters:
  • path (str) – Destination file path.

  • **kwargs – Additional keyword arguments passed to pandas.DataFrame.to_csv().

Return type:

None

classmethod example()[source]#
Return type:

None