File: bestfitcommand.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (69 lines) | stat: -rw-r--r-- 3,298 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<HTML>
<HEAD>
<TITLE>BESTFIT command</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><font size="+3" color="green"><B>BESTFIT command</B></font></P>

<TABLE border="1" cols="2" frame="box" rules="all" width="590">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%" valign="top"><CODE>
BESTFIT pmin pmax penalty error parm pout<br />
BESTFIT\WEIGHTS w pmin pmax penalty error parm pout<br />
BESTFIT\CYCLES n pmin pmax penalty error parm pout<br />
BESTFIT\WEIGHTS\CYCLES w n pmin pmax penalty error parm pout</CODE>
</TD></TR>
<TR>
<TD width="15%" valign="top"><B>Qualifiers</B>:</TD>
<TD width="85%" valign="top"><CODE>
\WEIGHTS, \CYCLES</CODE>
</TD></TR>
<TR>
<TD width="15%" valign="top"><B>Defaults</B>:</TD>
<TD width="85%" valign="top"><CODE>
\-WEIGHTS, \-CYCLES</CODE>
</TD></TR>
</TABLE>
<P>
 The <CODE>BESTFIT</CODE> command calculates parameters for
 a least squares fit to an error vector using adjustable parameters.  The parameter
 ranges, as well as the penalty function, must be vectors, with lengths equal to the
 number, <CODE>M</CODE>, of parameters for the fit.  The error
 array must be a vector with length equal to the number of locations,
 <CODE>N</CODE>.  The influence function, <CODE>PARM</CODE>, must be a matrix
 with <CODE>N</CODE> rows and <CODE>M</CODE> columns.</P>
<P>
 Suppose you have an error vector, <CODE>ERROR</CODE>, with length
 <CODE>N</CODE>, and that you have <CODE>M</CODE> variable
 parameters.  The measured effect of a unit change for each of the parameters at
 each of the <CODE>N</CODE> locations is stored in a matrix,
 <CODE>PARM</CODE>, with <CODE>N</CODE> rows and <CODE>M</CODE> columns.
 Suppose you have a vector <CODE>PENALTY</CODE>, of length
 <CODE>M</CODE>, which represents the resistences
 to change of the <CODE>M</CODE> parameters,  that is, the larger
 <CODE>PENALTY[i]</CODE> the smaller will be
 the adjustment of the <code>i</code><sup>th</sup> parameter.  The optimal set of changes of the
 <CODE>M</CODE> parameters within their allowed range, <CODE>PMIN</CODE> to
 <CODE>PMAX</CODE>, will be determined in the 'least-squares sense'. A vector, <CODE>POUT</CODE>, will
 be created with length <CODE>M</CODE> and filled with the parameter changes giving the "best" fit.</P>
<P>
 The <CODE>\CYCLES</CODE> qualifier allows the user to specify
 the maximum number of iteration steps for the fit.  When this maximum number is reached,
 the fit will stop.  The fit will also stop if the fit is successful before this maximum
 iteration number is reached.  If the <CODE>\WEIGHTS</code>
 qualifier is also used, the weight array comes before the iteration number in the
 parameter list.</P>
<P>
 If the <CODE>\WEIGHTS</CODE> qualifier is used, a weight vector,
 <CODE>w</CODE>, will be expected.  The weight vector should
 have length <CODE>N</CODE>, the length of the error vector.
 The weight, <CODE>w[i]</CODE>, corresponds to the 'importance'
 of reducing the initial error to zero at the <code>i</code><sup>th</sup> location.  The closer
 to zero the value of <CODE>w[i]</CODE>, the looser will be the fit at the <code>i</code><sup>th</sup>
 location. If the <CODE>\CYCLES</CODE> qualifier is also used, the weight array comes before the
 iteration number in the parameter list.</P>
</BODY>
</HTML>