Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
TAChart
(Moderator:
Ask
) »
How to get goodness of fit in TAChart Fit Series?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
what to do if my target M...
by
nickysn
[
Today
at 04:16:02 pm]
Parameter passing odditie...
by
KodeZwerg
[
Today
at 04:15:23 pm]
trunk compiler bug for mi...
by
nickysn
[
Today
at 04:03:44 pm]
Offical launch of the 1 B...
by
BeniBela
[
Today
at 03:52:05 pm]
compiler error in unit
by
paule32
[
Today
at 03:49:50 pm]
Xcode Command Line Tools ...
by
Martin_fr
[
Today
at 03:45:26 pm]
Compile/Convert Delphi pr...
by
Joseph
[
Today
at 02:43:45 pm]
how to tweek fpmake to co...
by
Key-Real
[
Today
at 02:33:27 pm]
Can function be used for ...
by
VisualLab
[
Today
at 02:15:30 pm]
Multithreading - synchron...
by
mika
[
Today
at 01:48:51 pm]
A fairly simple sound sol...
by
KodeZwerg
[
Today
at 01:48:26 pm]
May be useful to somebody
by
KodeZwerg
[
Today
at 12:38:22 pm]
match automatic highlight...
by
Чебурашка
[
Today
at 11:35:14 am]
Tchart with dual numbers ...
by
wp
[
Today
at 10:48:18 am]
Generics - correct syntax
by
VisualLab
[
Today
at 10:23:16 am]
add new targets to make
by
Key-Real
[
Today
at 09:38:23 am]
Debugger crashes with App...
by
Martin_fr
[
Today
at 09:29:46 am]
Copyrights Q
by
BrassGear
[
Today
at 09:13:14 am]
[SOLVED] how to build the...
by
Key-Real
[
Today
at 09:12:33 am]
Quirky windows
by
tetrastes
[
Today
at 08:59:06 am]
How can I draw a rectangl...
by
Handoko
[
Today
at 07:30:55 am]
Draw a line in the Scroll...
by
Handoko
[
Today
at 07:27:54 am]
web development using pas...
by
Nate897
[
Today
at 02:04:05 am]
questionable function def...
by
440bx
[
Today
at 01:35:28 am]
Why isn't TTIRadioGroup's...
by
jamie
[
Today
at 12:13:45 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to get goodness of fit in TAChart Fit Series? (Read 3306 times)
jwdietrich
Hero Member
Posts: 1232
How to get goodness of fit in TAChart Fit Series?
«
on:
July 27, 2015, 12:38:22 pm »
Is there a field or property that delivers an estimate for the goodness of fit in TAChart's Fit Series? I well understand that R
2
doesn't make sense for nonlinear regression; However, information like a p value or even Akaike's information criterion (AIC) would be useful.
Alternatively, is this information provided by the ipfpol procedure from numlib? Unfortunately, FPC's numlib is nearly undocumented.
(Note: This is a re-post of the question
http://stackoverflow.com/questions/31616676/goodness-of-fit-in-tachart-fit-series
at stackoverflow. I didn't get an answer there.)
Logged
function GetRandomNumber: integer; // xkcd.com
begin
GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;
http://www.formatio-reticularis.de
Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux
marcov
Administrator
Hero Member
Posts: 11455
FPC developer.
Re: How to get goodness of fit in TAChart Fit Series?
«
Reply #1 on:
July 27, 2015, 01:13:13 pm »
There is numlib documentation, and some examples. Problem is that both examples and documentation are older than the library files, and the documentation is Dutch.
Logged
wp
Hero Member
Posts: 11923
Re: How to get goodness of fit in TAChart Fit Series?
«
Reply #2 on:
July 27, 2015, 02:11:13 pm »
No, TAChart does not calculate any goodness-of-fit parameters. But you can do this by yourself since the results of the fitting parameters are returned by the FitSeries (properties "ParamCount" and "Param[AIndex]").
You mention non-linear fits: They are not supported by TFitSeries at all. Therefore, if you have dedicated fitting tasks you should employ an external numerical library such as the excellent dmath (
https://sourceforge.net/projects/dmath/
).
Sorry for not giving you an answer in your stackoverflow post. But I do not check this site regularly. Post all Lazarus-related questions here.
«
Last Edit: July 27, 2015, 02:17:46 pm by wp
»
Logged
wp
Hero Member
Posts: 11923
Re: How to get goodness of fit in TAChart Fit Series?
«
Reply #3 on:
July 27, 2015, 06:15:56 pm »
In r49571 I added calculation of R-squared as a simple goodness-of-fit parameter (--> new read-only property "GoodnessOfFit" of TFitSeries). See also the updated FitDemo in the demos folder.
More advanced calculations would require knowledge of the standard errors of the data points. In case they are known the goodness-of-fit calculation can be performed by the event handler "OnCalcGoodnessOfFit" replacing the built-in R-squared calculation method.
Logged
jwdietrich
Hero Member
Posts: 1232
Re: How to get goodness of fit in TAChart Fit Series?
«
Reply #4 on:
August 09, 2015, 07:47:30 pm »
Thanks for all your suggestions. I will check them and will report my experiences here.
Logged
function GetRandomNumber: integer; // xkcd.com
begin
GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;
http://www.formatio-reticularis.de
Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
TAChart
(Moderator:
Ask
) »
How to get goodness of fit in TAChart Fit Series?
TinyPortal
© 2005-2018