forum.alglib.net

ALGLIB forum
It is currently Sun Apr 28, 2024 7:26 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: TaskRCond Definition
PostPosted: Mon Nov 08, 2010 10:49 pm 
Offline

Joined: Mon Nov 08, 2010 10:39 pm
Posts: 1
Hello, I just started testing out alglib and I'm trying to some polynomial fitting. I'm comparing my results to what a coworker got with the JMP tool. I need to get an RSquare value to do this and polynomialfitreport.TaskRCond attribute seems to be close to this, but my numbers are way off. Here's my VB code. xtime and Y1 have already been properly populated and a quadratic equation should fit the data well.

Dim BCInterpolant As New alglib.barycentricinterpolant
Dim FitRpt As New alglib.polynomialfitreport
alglib.polynomialfit(XTime, Y1, XTime.Length - 1, 3, info, BCInterpolant, FitRpt)
Dim a2() As Double
alglib.polynomialbar2pow(BCInterpolant, a2)
Dim RSquare As Double = FitRpt.taskrcond * FitRpt.taskrcond

The JMP RSquare value was 0.9974 and my "RSquare" value above as calculated is 0.1977. Am I misinterpreting the purpose of taskrcond? Thanks for your help.


Top
 Profile  
 
 Post subject: Re: TaskRCond Definition
PostPosted: Tue Nov 09, 2010 7:58 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
TaskRCond has another meaning - it is reciprocal of condition number of linear system solved by algorithm. It is always between 0 (degenerate system) and 1 (well conditioned system). So you've misinterpreted it.

ALGLIB 3.1 does not support RSquare, so you have to calculate it yourself.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 339 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group