线性和非线性回归
用线性或非线性库模型或自定义模型进行曲线或曲面拟合
回归是一种估计一个响应(输出)变量和一个或多个预测变量(输入)变量之间关系的方法。您可以使用线性和非线性回归来预测、预报和估计观察到的数据点之间的值。Curve Fitting Toolbox™ 函数允许您通过使用线性和非线性模型库或自定义方程对数据进行曲线或曲面拟合来执行回归。
您可以使用曲线拟合器以交互方式对数据进行曲线和曲面拟合。有关详细信息,请参阅曲线拟合。您还可以在命令行中使用 fit
函数对一组数据进行曲线或曲面拟合。有关简单示例,请参阅Polynomial Curve Fitting。
App
曲线拟合器 | 对数据进行曲线和曲面拟合 |
函数
主题
教程
- 参数化拟合
查找曲线拟合器和fit
函数的所有库模型类型,设置拟合选项,并优化起点。 - Introduction to Least-Squares Fitting
Perform least-squares fitting by using error distributions and linear, weighted, robust, and nonlinear least squares. - Polynomial Models
Fit polynomials in the Curve Fitter app or with thefit
function. - Exponential Models
Fit exponential models in the Curve Fitter app or with thefit
function. - Fit Fourier Models
Fit Fourier series models in the Curve Fitter app or with thefit
function. - 高斯模型
在曲线拟合器中或使用fit
函数拟合高斯模型。 - Power Series
Fit power series models in the Curve Fitter app or with thefit
function. - Rational Models
Fit rational polynomial models in the Curve Fitter app or with thefit
function. - Sum of Sines Models
Fit sum of sines models in the Curve Fitter app or with thefit
function. - Weibull Distributions
Fit Weibull distribution models in the Curve Fitter app or with thefit
function. - Custom Models
If the Curve Fitting Toolbox library does not contain a desired parametric equation, you can create your own custom equation. - Custom Linear Fitting
In the Curve Fitter app, you can use the Custom Equation fit to define your own linear or nonlinear equations.
工具工作流
- Interactive Curve and Surface Fitting
Select data and model types to fit curves and surfaces by using the Curve Fitter app and then save your session. - Data Selection
Select data to fit curves and surfaces in Curve Fitter app, identify compatible size data and troubleshoot data problems. - Compare Fits in Curve Fitter App
Find the best fit by comparing visual and numeric results, including fitted coefficients and goodness-of-fit statistics. - Surface Fitting to Franke Data
Create and compare surface fits in Curve Fitter app using example data. - Surface Fitting to Biopharmaceutical Data
Curve Fitting Toolbox software provides some example data for an anesthesia drug interaction study. - Custom Nonlinear ENSO Data Analysis
This example fits the ENSO data using several custom nonlinear equations. - Gaussian Fitting with an Exponential Background
This example fits two poorly resolved Gaussian peaks on a decaying exponential background using a general (nonlinear) custom model.
编程工作流
- Curve and Surface Fitting
Workflow for programmatic curve and surface fitting in Curve Fitting Toolbox. - 曲线和曲面拟合的库模型列表
查找使用fit
函数进行编程数据拟合所需的所有 Curve Fitting Toolbox 库模型名称。 - Curve and Surface Fitting Objects and Object Functions
Learn how to create, access, and modify curve and surface fit objects. - Polynomial Curve Fitting
This example shows how to fit polynomials up to sixth degree to some census data using Curve Fitting Toolbox. - Fit Polynomial Model to Data
This example shows how to fit a polynomial model to data using the linear least-squares method. - Compare Robust Fitting Methods
This example shows how to fit a polynomial model to data using the bisquare weights, least absolute residuals (LAR), and linear least-squares methods. - 自定义非线性人口普查拟合
此示例说明如何对人口普查数据进行自定义方程拟合,指定边界、系数和问题相关参数。 - Fit Exponential Model to Data
This example shows how to fit an exponential model to data using the trust-region and Levenberg-Marquardt nonlinear least-squares algorithms. - Improve Model Fit with Weights
This example shows how to fit a polynomial model to data using both the linear least-squares method and the weighted least-squares method for comparison. - Surface Fitting with Custom Equations to Biopharmaceutical Data
This example shows how to use Curve Fitting Toolbox™ to fit response surfaces to some anesthesia data to analyze drug interaction effects.