New statistical functions

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

Post Reply
Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

New statistical functions

Post by Janschenkel » Mon Jun 17, 2013 5:46 pm

Hi all,
My curiosity pushed me into figuring out how the built-in statistical functions were implemented (e.g. average and standardDeviation)
And then I got a bit carried away, and started implementing the functions which I had implemented in pure LiveCode earlier:
  • averageDeviation (with shorthand: avgDev)
  • geometricMean
  • harmonicMean
  • populationStandardDeviation (with shorthand: pStdDev)
And added a few synonyms for existing functions:
  • average -> arithmeticMean, mean
  • standardDeviation -> sampleStandardDeviation, sStdDev
You can check out the code in the feature-new_statistical_functions branch of my github repo.

What do you think - worthy of inclusion in LiveCode?
If so, I'll do some final tweaks for the error messages and submit a pull request?

Cheers,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5138
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: New statistical functions

Post by Mark » Mon Jun 17, 2013 7:00 pm

Hi Jan,

I would like to see improved matrix calculation, to allow me to estimate regression functions.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: New statistical functions

Post by Janschenkel » Mon Jun 17, 2013 7:21 pm

Update: I just added sample and population variance.
So once I've tweaked the error messages, I think it's good to go...

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: New statistical functions

Post by Janschenkel » Mon Jun 17, 2013 7:24 pm

@Mark: I haven't yet investigated the matrix code - but once you get the hang of it, it shouldn't be too hard :-)
It's probably bed to split that off into a topic of its own on this forum, with a concrete idea, so others can chip in.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: New statistical functions

Post by Janschenkel » Tue Jun 18, 2013 7:02 am

Update: I tweaked the error messages and submitted pull request 74 for this set of new functions.

Cheers,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply

Return to “Engine Contributors”