Lines and curves
Some of the visualization types can include additional information in reference lines or several different types of curves. Lines and curves can be added in the visualization properties for each applicable visualization.

For example, you might want to show how well your data points adapt to a certain polynomial curve fit or to a logistic regression curve fit.
Curve fit (regression analysis) allows you to summarize a collection of sample data points by fitting them to a model that can describe the data and show a curve or a straight line on top of a visualization. The curve is normally not a fixed curve, but rather a line that can be changed when changing the input data during filtering. However, you can always select to "freeze" the updating of a curve and only allow it to be updated manually.
Curve fitting can be used either to determine the parameter values of a known regression model or to find a model that fits the data better than other models. Spotfire also lets you define your own curves, either directly from an expression or from an expression which is linked to a data table containing curve parameters.
See Adding a line or a curve to a visualization, Curve fit models and Curve fit theory for details about how to add lines and curves and how they work.
Transformations
The X- and Y-values used in the curve fitting are the plotted values and therefore, they are affected by scaling. This means that if you use log scale you might want to apply a different curve fitting model than you would otherwise. For example, if you want to do logistic regression and have either log10-values or log10-scaled values on the X-axis, you should apply the setting "Assume that X is log10-transformed" in the Edit Curve dialog to get the expected results.
Limitations on data
Not all types of input data can be used to calculate curves using all different types of models.
- more than one data point to use in the calculation
- that not all data points have the same X- and Y-values (lie on top of each other)
- that not all data points have the same X-value
In addition, the logarithmic model, the power model and the logistic regression model require that all data points have positive X-values. The power model and the exponential model also require that all Y-values have the same sign (positive or negative).

If you choose to export your calculation, any error message shown in this tooltip will also be included in the column "Notes" of the resulting export file. Note that this column always exists in the export file. If there are no errors, it will be empty.
- Adding a line or a curve to a visualization
Some of the visualization types can include additional information in reference lines or several different types of curves. Lines and curves can be added in the visualization properties for each applicable visualization. - Curve fit models
There are several different models available for curve fitting. The various models are briefly explained here. - Curve fit theory
Generally, curve fit algorithms determine the best-fit parameters by minimizing a chosen merit function. To optimize the merit function, you must select a set of initial parameter estimates and then iteratively refine the merit parameters until the merit function does not change significantly between iterations. The Levenberg-Marquardt algorithm has been used for nonlinear least squares calculations in the current implementation.