<s>
In	O
mathematics	O
,	O
least	B-Algorithm
squares	I-Algorithm
function	O
approximation	O
applies	O
the	O
principle	B-Algorithm
of	I-Algorithm
least	I-Algorithm
squares	I-Algorithm
to	O
function	O
approximation	O
,	O
by	O
means	O
of	O
a	O
weighted	O
sum	O
of	O
other	O
functions	O
.	O
</s>
<s>
The	O
best	O
approximation	O
can	O
be	O
defined	O
as	O
that	O
which	O
minimizes	O
the	O
difference	O
between	O
the	O
original	O
function	O
and	O
the	O
approximation	O
;	O
for	O
a	O
least-squares	B-Algorithm
approach	O
the	O
quality	O
of	O
the	O
approximation	O
is	O
measured	O
in	O
terms	O
of	O
the	O
squared	O
differences	O
between	O
the	O
two	O
.	O
</s>
<s>
A	O
generalization	O
to	O
approximation	O
of	O
a	O
data	O
set	O
is	O
the	O
approximation	O
of	O
a	O
function	O
by	O
a	O
sum	O
of	O
other	O
functions	O
,	O
usually	O
an	O
orthogonal	B-Algorithm
set	I-Algorithm
:	O
</s>
<s>
The	O
extension	O
of	O
Pythagoras	O
 '	O
theorem	O
in	O
this	O
manner	O
leads	O
to	O
function	B-Algorithm
spaces	I-Algorithm
and	O
the	O
notion	O
of	O
Lebesgue	O
measure	O
,	O
an	O
idea	O
of	O
“	O
space	O
”	O
more	O
general	O
than	O
the	O
original	O
basis	O
of	O
Euclidean	O
geometry	O
.	O
</s>
<s>
as	O
an	O
adequate	O
criterion	O
for	O
obtaining	O
the	O
least	B-Algorithm
squares	I-Algorithm
approximation	I-Algorithm
,	O
function	O
,	O
of	O
with	O
respect	O
to	O
the	O
inner	O
product	O
space	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
the	O
least	B-Algorithm
squares	I-Algorithm
approximation	I-Algorithm
of	O
is	O
the	O
function	O
closest	O
to	O
in	O
terms	O
of	O
the	O
inner	O
product	O
.	O
</s>
