ecl-logo Documentation
ECL`

AnalyzeFit

AnalyzeFit[Coordinates, FitType]F

fits a function F of type FitType to the given coordinates.

Details

    Input
    Output
    General Options
    Method Options
    Messages
  • CannotFitUnable to find a satisfactory solution. Please try specifying parameter guesses using StartingValues or change your fit type.
    DataSizeMismatchNumber of data points in each dimension must be equal.
    FitFieldResolutionFailureFailed to resolve the FitField for `1` objects.
    ImaginaryFitParametersUnable to find a real valued set of fit parameters. Please try specifying parameter guesses using StartingValues or change your fit type.
    InputDataSizeMismatchNumber of input dimensions in data must match number of inputs in pure function.
    InvalidDomainIn the Domain option, the left boundary should be less than the right boundary.
    InvalidExpressionTypeExpression type `1` cannot be fit to data with `2` independent variables.
    InvalidFitFieldSpecified fit field `1` is not a field in `2`.
    InvalidFunctionPure function input is invalid. Function must only contain symbolic parameters and must return a numeric value when evaluated.
    InvalidPolynomialDegreeSpecified polynomial degree is too high for given data set.
    MachinePrecisionIssueThe fit function `1` results in numbers that are either too large or too small. Please check your input values, try specifying parameter guesses using StartingValues, or change your fit type.
    NonPositiveValuesExcluding non-positive values for log fitting.
    NoUnknownParameterThere is no unknown parameter to fit in the given expression.
    NoValidDataNo remaining data points after filtering based on Domain, Range, and Exclude options.
    OverFitYou are fitting a function with `1` parameters to `2` data points. Generally speaking, this is not a good idea. It means there are infinite number of fits that will interpolate your data points exactly. One such solution will be returned. Error prediction will not be available in this case.
    TooManyOutliers`1` points out of `2` total points have been flagged as outliers and excluded from fitting. This is dangerously high. Terminating recursive outlier exclusion loop after `3` iterations.
    UnusedFitNormalizationFitNormalization will rescale the equation parameters only for Exponential, Logistic, LogisticBase10, and GeneralizedLogistic.
    ZeroInterceptIgnoredThe ZeroIntercept option can only be used with fit type Linear, but fit type `1` was provided. ZeroIntercept will be ignored.

Examples

open allclose all

Example Setup

These expressions are used in the examples to follow:

Basic Examples  (3)

Fit a line to data:

Fit an exponential to data:

Fit uncertain data:

Additional Examples  (30)

Fit Type  (9)

Assumes linear fit if no expression given:

Fit a cubic polynomial:

Fit a gaussian:

Fit a linear function:

Fit a linear-log expression 10^(a+b*x):

Fit a log-linear expression a+b*Log[x]:

Fit a log-log expression 10^(a+b*Log[x]):

Fit error function sigmoid:

Fit logistic function sigmoid:

Multivariate Data  (5)

Fit a 2-D Gaussian:

Fit a linear function of two variables:

Fit a LinearLog function of two variables:

Fit a quadratic function of two variables:

Specify multivariate function to fit to:

Object inputs  (10)

Fit a LogLinear standard curve relating copy number to quantification cycle:

Fit a standard curve relating peak position to fragment size by pulling all x-values from first object and all y-values from second object:

Fit a standard curve to fluorescence intensities data:

Fit a standard curve to fluorescence kinetics data:

Fit function of two variables to fluorescence objects:

Fit function of two variables to peak positions:

Fit Volume vs LiquidLevel using ObjectFields to address multiple fields in the same objects:

One data point per object:

Pull peak positions from object and specify sizes:

Pull sizes from object and specify positions:

Uncertain data  (5)

Data with x-uncertainty only:

Data with y-uncertainty only:

Fitting algorithm takes into account uncertainty in data points:

Fit to numerical distributions mixed with quantities:

Fit to quantity distributions mixed with quantities:

Units  (1)

The given data can be a QuantityArray:

Options  (30)

Domain  (2)

Distribution points are filtered out based on their means:

Points outside Domain will be excluded from fitting:

ErrorMethod  (2)

Use first order approximation to derive best fit parameters distribution:

Use monto carlo fitting to obtain best fit parameters distribution:

Exclude  (2)

If there are known outliers in the data set, they can be excluded from fitting by listing them in the Exclude list:

Specify index of points to exclude:

ExcludeOutliers  (2)

Excluding outliers from a fit often results in new outliers due to the resulting fit being more accurate. ExcludeOutliers->Repeatedly re-fits excluding the newly found outliers up to 3 times or until no more outliers are found:

If ExcludeOutliers->True, any points detected as outliers will be excluded from fitting:

FitField  (3)

Specify data field for both x and y objects:

Specify data field for z objects only:

Specify field in data objects from which x-coordinates are pulled:

FitNormalization  (1)

Whether or not to scale the fitting equation to help in finding the fit:

LogBase  (1)

Fit log expression using base 2:

LogTransformed  (1)

Applied when input fitType is LogisticFourParam, True when the input x axis is log-transformed, False otherwise:

Method  (1)

Method used for fitting:

Name  (1)

Name to be used as the name of Object[Analysis, Fit] generated by the analysis:

NumberOfSamples  (1)

Specify number of samples used in monte carlo sampling:

OutlierDistance  (1)

Control the distance at which points are labeled as outliers:

Output  (1)

Return the uploaded object:

PolynomialDegree  (1)

Fit a third degree polynomial to data:

Range  (1)

Any points outside range are excluded from the fit calcuation:

ReferenceField  (1)

Specify reference field:

Scale  (1)

Whether or not to scale the data to the unit box before fitting:

StartingValues  (2)

Some problems require good starting values in order to obatin a good fit:

Specify initial guesses for some of the parameter values:

Template  (2)

Explicitly specify PolynomialDegree option, and pull remaining options from previous fit analysis:

Use options from previous fit analysis to fit a cubic:

TransformationFunction  (2)

Transform Absorbance spectrum into x-values by computing its absorbance at a 550 Nanometer:

Transform EmissionTrajectories into x-values by taking the Max fluorescence across all time in the trajectory:

ZeroIntercept  (1)

Set to True to force a linear fit through the origin:

Messages  (20)

CannotFit  (1)

Unable to find a satisfactory fit to the data:

DataSizeMismatch  (1)

Size of x and y data lists must match:

FitFieldResolutionFailure  (1)

Not every object has fields that can be fit to:

ImaginaryFitParameters  (1)

Unable to find a real valued set of parameters:

InputContainsTemporalLinks  (1)

Warn the user if any of the inputs contain temporal links:

InputDataSizeMismatch  (1)

Number of variables in function must match dimenions of input data:

InvalidDomain  (1)

In the Domain option, the left boundary should be less than the right boundary:

InvalidExpressionType  (2)

Given known expression type with incompatible data:

Given unknown expression type:

InvalidFitField  (1)

FitField option must be a field in the input objects:

InvalidFunction  (1)

Pure function input must contain symbolic parameters only:

InvalidPolynomialDegree  (1)

Polynomial degree must not exceed number of data points:

MachinePrecisionIssue  (2)

The fit function results in numbers that are either too large or too small:

The input data results in numbers that are either too large or too small:

NonPositiveValues  (1)

Negative x values will be excluded when fitting to a log function:

NoUnknownParameter  (1)

There must be unknown parameters in the expression in order to fit:

NoValidData  (1)

Cannot fit if all data points are filtered out by option restrictions:

OverFit  (1)

Overfitting message thrown when you have fewer data points than parameters in the fitted function:

TooManyOutliers  (1)

If too many of the points are excluded as outliers, the resulting fit should not be trusted:

ZeroInterceptIgnored  (1)

The ZeroIntercept option can only be set to True if the fit type is Linear:

Last modified on Fri 15 Aug 2025 12:03:44