is an option to LocalModelFit that specifies the degree of the local polynomial used.
FitDegree
is an option to LocalModelFit that specifies the degree of the local polynomial used.
Details
- FitDegree, also known as polynomial order, is used to specify the degree of the polynomial used in a fit.
- Possible values include:
-
0 a constant fit 1 a linear fit 2 a quadratic fit n a polynomial of degree n
Examples
Basic Examples (2)
Specify the polynomial degree of a local fit:
data = {...};trend = LocalModelFit[data, FitDegree -> 2]Show[ListPlot[data], Plot[trend[x], {x, 0, 2Pi}, PlotStyle -> Red]]Compare approximation using different polynomial degrees:
fits = Table[LocalModelFit[{...}, FitDegree -> d], {d, 0, 4}]Plot[Evaluate@Quiet@Comap[fits, x], {x, 0, 2Pi}, PlotLegends -> Range[0, 4]]See Also
Related Guides
History
Text
Wolfram Research (2025), FitDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/FitDegree.html.
CMS
Wolfram Language. 2025. "FitDegree." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FitDegree.html.
APA
Wolfram Language. (2025). FitDegree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FitDegree.html
BibTeX
@misc{reference.wolfram_2026_fitdegree, author="Wolfram Research", title="{FitDegree}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/FitDegree.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fitdegree, organization={Wolfram Research}, title={FitDegree}, year={2025}, url={https://reference.wolfram.com/language/ref/FitDegree.html}, note=[Accessed: 13-June-2026]}