|
Java example source code file (fitting.xml)
The fitting.xml Java example source code
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
<document url="fitting.html">
<properties>
<title>The Commons Math User Guide - Curve Fitting
</properties>
<body>
<section name="13 Curve Fitting">
<subsection name="13.1 Overview" href="overview">
<p>
The fitting package deals with curve fitting for univariate real functions.
When a univariate real function y = f(x) does depend on some unknown parameters
p<sub>0, p1 ... pn-1, curve fitting can be used to
find these parameters. It does this by <em>fitting the curve so it remains
very close to a set of observed points (x<sub>0, y0),
(x<sub>1, y1) ... (xk-1, yk-1). This
fitting is done by finding the parameters values that minimizes the objective
function Σ(y<sub>i - f(xi))2. This is actually a
least-squares problem.
</p>
<p>
For all provided curve fitters, the operating principle is the same.
Users must
<ul>
<li>
create an instance of the fitter using the <code>create factory method of the
appropriate class,
</li>
<li>
call the <a href="../apidocs/org/apache/commons/math3/fitting/AbstractCurveFitter">fit
with a <code>Collection of
observed data points</a> as argument, which will return an array with the parameters that
best fit the given data points.
</li>
</ul>
The list of observed data points to be passed to <code>fit can be built by incrementally
adding instances to an instance of <a href="../apidocs/org/apache/commons/math3/fitting/WeightedObservedPoints.html">WeightedObservedPoints,
and then retrieve the list of <code>WeightedObservedPoint by calling the
Other Java examples (source code examples)Here is a short list of links related to this Java fitting.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.