FittedModel
FittedModel[…]
表示由类似 LinearModelFit 的函数得到的符号拟合模型.
更多信息
- 可以从 FittedModel[…]["property"] 获取拟合模型的属性.
- FittedModel[…][{prop1,prop2,…}] 给出几种属性.
- FittedModel[…][x1,…] 给出在特定点 x1、… 的最佳拟合函数.
- Normal 给出 FittedModel 中最佳拟合函数的表达式.
- FittedModel 对象由诸如 LinearModelFit、NonlinearModelFit 和 GeneralizedLinearModelFit 这样的的拟合函数返回.
- FittedModel[…][prop,ann] 给出与属性 prop 相关的注释 ann.
- 给定类型的拟合模型的属性列在生成模型的诸如 LinearModelFit 这样的函数页上.
范例
打开所有单元 关闭所有单元基本范例 (2)
从非线性拟合得到 FittedModel:
data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}};nlm = NonlinearModelFit[data, Log[a + b x ^ 2], {a, b}, x]从 FittedModel 对象得到函数形式:
Normal[nlm]nlm[2.3]Show[ListPlot[data], Plot[nlm[x], {x, 0, 5}], Frame -> True]nlm["FitResiduals"]data = Table[{x, Log[2 + 3 x ^ 2] + RandomReal[{0, 0.5}]}, {x, RandomReal[{-10, 10}, 200]}];ListLinePlot[Sort@data]m = NonlinearModelFit[data, Log[a + b x ^ 2], {a, b}, x]Show[ListPlot[data], Plot[m[x], {x, -10, 10}]]ListPlot[m["FitResiduals"]]范围 (4)
lm = LinearModelFit[Range[10], x ^ 2, x]lm["ParameterErrors", "Description"]lm["ParameterErrors", "LongDescription"]lm = LinearModelFit[Range[10], {x ^ 2, Sin[x]}, x]lm[{"Response", "PredictedResponse"}]ListPlot[%]得到线性拟合的一个 FittedModel 对象:
LinearModelFit[Table[{i, RandomReal[{i - 1, i}]}, {i, 10}], x ^ 2, x]NonlinearModelFit[Table[{i, RandomReal[{i - 1, i}]}, {i, 10}], Exp[a x], a, x]GeneralizedLinearModelFit[Table[{i, 1 / RandomReal[{i - 1, i}]}, {i, 10}], x, x, ExponentialFamily -> "Gamma"]LogitModelFit[Table[{i, RandomReal[{i - 1, i}] / 10}, {i, 10}], x, x]ProbitModelFit[Table[{i, RandomReal[{i - 1, i}] / 10}, {i, 10}], x, x]lm = LinearModelFit[Range[10], x ^ 2, x]lm["Properties"]nlm = NonlinearModelFit[Range[10], Exp[a x], a, x]nlm["Properties"]//Lengthglm = GeneralizedLinearModelFit[Range[10], x ^ 2, x]glm["Properties"]//Length推广和延伸 (1)
nlm = NonlinearModelFit[Exp[Range[10]] + RandomReal[1, 10], Exp[a + b x], {a, b}, x]Integrate[nlm[x], x]NIntegrate[nlm[x], {x, 1, 5}]FindRoot[nlm[x] == 10, {x, 1}]技术笔记
-
▪
- 统计模型分析
文本
Wolfram Research (2008),FittedModel,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FittedModel.html.
CMS
Wolfram 语言. 2008. "FittedModel." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/FittedModel.html.
APA
Wolfram 语言. (2008). FittedModel. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/FittedModel.html 年
BibTeX
@misc{reference.wolfram_2026_fittedmodel, author="Wolfram Research", title="{FittedModel}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/FittedModel.html}", note=[Accessed: 25-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_fittedmodel, organization={Wolfram Research}, title={FittedModel}, year={2008}, url={https://reference.wolfram.com/language/ref/FittedModel.html}, note=[Accessed: 25-November-2026]}