[Gambas-user] curve fitting library ?

Randall Morgan rmorgan62 at ...626...
Mon Jan 23 09:06:49 CET 2012


Most of the stuff I did in signal processing was on the 68000 and Z80's. So
I let most of that go a very long time ago. Besides, unless you know what
you are looking for in a smoothing algorithm, any code would be useless.
For example, the simplest algorithm for smoothing is the moving average
method. It's very simple to write in any programming language. Simple
decide on the number of data points you are going to track and then average
the value of that many points. That average becomes you first point. Slide
the window up one value (or more, as long as there is plenty of overlap),
allowing the low value(s) to fall out of the window, then calculate the
average again. and plot your next point. Continue until you're out of input
data.

This issue with the moving average method is that you will flatten your
data and loose your peaks. Since you have not said what your data is being
used for or how you are getting it, it is impossible to guess what method
of smoothing would be appropriate. So you need to ask yourself, are my
peaks important? Is my data timed? What am I doing with it once I smooth it
out? If you are displaying it, what information in your data is important
to convey to the viewer? Etc... Without details no one can really help you.
Give me specifics and perhaps I can be of more help.



On Sun, Jan 22, 2012 at 11:44 PM, Wally <wally at ...2037...> wrote:

>
> I assume you do not have a code  example, right  ?
>
>
> On Sunday, January 22, 2012 17:02:17 Randall Morgan wrote:
> > Just a thought,
> >
> > You could write a callable wrapper around numpy then call that from
> Gambas.
> > Would give you all the power of the python numerical library from within
> > Gambas.
> >
> > On Sun, Jan 22, 2012 at 2:18 AM, Randall Morgan <rmorgan62 at ...626...>
> wrote:
> > > Not with Gambas and it's been a long while. But if you understand the
> > > algorithms used and the type of curve fitting you desire for your
> > > problem
> > > domain then implementing it in Gambas is not a problem.
> > >
> > > You may want to google curve fitting algorithms. You need to know if
> you
> > > want a linear, polynomial, rational, cubic, or nonlinear fitting. Then
> > > find a C/C++/Python implementation and flow chart the algorithm. Then
> > > you  can easily convert it to Gambas or any programming language.
> > >
> > > On Sun, Jan 22, 2012 at 12:54 AM, Wally <wally at ...2037...> wrote:
> > >> Does anyone have experience with curve fitting and/or peakfinding
> > >> using gambas ?    (e.g. example code)
> > >>
> > >> Is there a plain C library (Linux) known, suitable to this problem
> > >> and gambas ?
> > >>
> > >> Something like "fityk" (which is written in C++) but written in plain
> > >> C
> > >> to use with "EXTERN"
> > >>
> > >> I might wrap the fityk C++ or try Gnu Scientific Library, but i'm
> > >> still
> > >> searching for alternatives.
> > >>
> > >> wally
> > >>
> > >>
> > >>
> > >> ----------------------------------------------------------------------
> > >> -------- Try before you buy = See our experts in action!
> > >> The most comprehensive online learning library for Microsoft
> > >> developers
> > >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
> > >> MVC3,
> > >> Metro Style Apps, more. Free future releases when you subscribe now!
> > >> http://p.sf.net/sfu/learndevnow-dev2
> > >> _______________________________________________
> > >> Gambas-user mailing list
> > >> Gambas-user at lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > > --
> > > If you ask me if it can be done. The answer is YES, it can always be
> > > done. The correct questions however are... What will it cost, and how
> > > long will it take?
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?



More information about the User mailing list