software for data presentation, statistical analysis, marketing and prediction.

Free download:
LeoStatistic.zip or
(selfextracting winzip file)


  • Introduction
  • Data
  • Statistics
  • Results presentation
  • Samples
  • Popular statistics and data analysis
  • Curve fit.

    To fit experimental data that looks like grouping around sort of curve one has to find a function of one argument that by some criteria in best way suit the data. There are two principal different cases:

    1) A structure of the fitting formula is known from theoretical analysis and what is need to be defined are numerical values of coefficients incorporated in the formula. Simple example - one can analyze measured trajectory of the thrown stone by collecting its coordinates from array of cadre in a movie. The theoretical formulas for such experiment is very well known. Depend on accuracy of the measurement one can extract from it not only initial velocity and angle to the horizon of the stone direction but also probably resisting force of air deceleration. The task really comes to finding coefficients of these formulas and defined the accuracy of their definition.

    2) There is none or very slim outside knowledge of specific formula for the existing experimental curve. In this case fitting a curve has a meaning of the criteria for choosing from competitive theories or just for compressed presentation of experimental data. The decision on the specific best fitting formula  is depend on the arbitrary set of criterions by the researcher.

    LeoStatistic offers several schemes and correspondent to them user interfaces for curve fitting. Each of them could have specific advantages applying for any given problem.

    In tab "Data" depend on physical sense of data, set status of the parameters in that way to have in data series or one argument and one or more values (note that in same of the statistical schemes one one value is allowed) or just one value - it is for situation when data series is represent ordered array with equal steps. In the case if desirable presentation is ordered array  but a current mode of view is a histogram be sure to set the what you want by going in tab "View" of the control panel and press down a button Switch to line presentation.

    Go to "Statistics" tab of control panel of LeoStatistic to select a statistical scheme of curve fitting:

    Statistical schemes for firve fitting

    Chose one of the available statistical schemes:

    Polynom fitting. The best fitting of the data with the polynomial function:

    y(x) = P(x,n) = ao + a1*x + a2*x2 ... + ... an*xn   , (1)

    will be found.  The software will exam polynoms with variety of grades in a range from 0  to 10 and will pick up the best in sense of overall fit and the best accuracy of determination of the coefficients of the formula. Coefficients that not defined with enough certainty will be omitted and presumed equal exact 0. There is option to calculate all coefficients using "Constructor style" unterface.  We can offer to customize you version of LeoStatistic by your request if there will be special order.

    Harmonic analysis. This scheme is the natural extension of the polynomial fitting. The fitting formula for harmonic analysis is:

    y(x) = P(x,n) + ΣAj*Cos((2π/Tj)*(x - βj)) , (2)

    where Aj - amplitude, Tj - period, βj - phase of j-th harmonic in the data presentation. The algorithm will at first approximate (fit) the data by polynomial function will try to fit data curve with best fitting numbers of harmonics components of the formula (2). All coefficients and their standard deviations of formula (2) except periods can be found by classical least square approximation. The algorithm of defining periods is our state of art development that can be shared under special agreement.

    Classical nonlinear approximation.

    Click on "Constructor style" button. The panel to build approximating formula

    F(y) = ao*fo(x) + a1*f1(x) + ... + an*fn(x) ,  (3)

    by pushing down buttons with images of available functions F(y) and fi(x) will appear:

    Constructor style curve fitting

    Try different combinations or if you know correct one in advance just assemble it.

    By checking box "deviation lines" the standard deviations lines along fitting curve will be shown. Note that in different areas of the chart the reliability of the approximation are vary as a rule.

    Click on ">>" button to return into main panel for curve fitting.

    From predefined list of formulas.

    This is the variation of previous scheme that demand even less efforts to find fitting formula.

    Click on "From list of formulas" button on the main panel for the curve fitting and such control panel will appear:

    From list of formulas approximation

    There are list of predefined formulas like described in equation (3) on this page available for approximation. There are possibilities to check them one by one manually and to select mostly nice looking or make a pick automatically.

    There are three options to do automatic selection of the best fitting formula are incorporated into LeoStatistic. They can be activated by clicking one of the corresponding buttons these will initiate automatic search best fitting formula according different criterions:

    "overall fit" - best in sense of minimum average deviation of calculated by the formula values from experimental ones. In addition a ratio of standard deviations of any defined coefficients to their value have to be no large then 20%.

    "min of max out" - the best formula will be chosen by minimum value of maximum deviation fitting value from any experimental point. In general words it means that most worst deviation for any experimental point will be less then for any other formulas.

    "stability" - the best formula are selected as the one that has minimum of  ratios of any standard deviations of approximated coefficients to theirs values. One can expect that in case of slight disturbance of experimental data the coefficients of such formula will stay less affected then others. This is a hypothesis only, by the way.

    A box "deviation lines" is for presenting or not the standard deviations lines along fitting curve will be shown.

    Click on ">>" button to return into main panel for curve fitting.

    We can conceder to make a customization the list of formulas and criteria of selecting best fit by special order.

    Custom defined formulas.

    This scheme permits to fit curve with formula like described in equation (3) with most universality.

    Click on "Custom formulas" button on the main panel for the curve fitting and its control panel will appear:

    Approximation by custom defiened formulas

    Specific form of functions F(y) and fi(x) can be edited by the will in programmable style. To do it select one of the existing formulas and press "Edit" button or double click on it and in the editing control type a new version and press "Enter".

    By pressing "Add" button a new member to the equation (3) will be added. A "Cut" button is for deleting.

    A syntax of the formulas permits basic arithmetical operation like +,-.*,/,a^b (a in grade of b)  and basic functions l with standard meaning of them: ln, exp, sin, cos, tan, asin, acos, atan, log10, sqrt, abs, pow10. Unlike the case of data modifications only  letter "x" that is substitution for the argument and "y" as a substitution of the values can be used in formula presentations. By obvious reasons.

    One of the most attractive features of this method is the ability to incorporate in the formulas numerical values of fundamental physical constants or physical-chemical properties of the materials like temperature of the melt or boiling, enthalpy, molecular weight or size of molecules and so on like this. Of course the most beneficial it could be for fitting only one dependences curve as soon numerical values will be the same for all curves. Obvious it can have a sense only for one material and experimental procedure in mostly.

    Note that this procedure is quite slow so we are not recommending it for fitting a very large experimental curves. Because of it this the method not include itself an option of the calculation of deviation lines that is very time consuming procedure.

    Click on ">>" button to return into main panel for curve fitting.

    User defined formula.

    Click on "User formula" button on the main panel for the curve fitting and its control panel will appear:

    Fitting by user defiened formula

    This scheme permits to find best fitting coefficients for the practically any formula that can be written in syntax described in previous scheme. The algorithm can be described as following:

    User is constructing a formula that is included names of coefficients added with the help of shown above control panel.

    To add new coefficient - fill up the following fields: Name of the coefficient and its Value; also for automatic search of its best fitting value - Step in initial search and Min and Max borders for legitimate values of it. In case if during the search the coefficient will be out of the borders it will assigned to the most  close border. Then push "Add" button or press "Enter" key on the keyboard. To edit and delete coefficient select it from list of existing and use "Edit" or "Delete" buttons correspondently.

    To start search of the best fit press "Run fitting" button.

    There are following "Fitting schemes" are incorporated. All off them are based on the idea that we are looking around some given set of fitting coefficients in n-dimensional space where n is number of fitting coefficients. As soon at the some of the attempts the best fit is found we are taken this point as a vantage and continue the search. Difference between schemes are in how next point to check is chosen:

    • Random linear - for each coefficients next value is uniformly randomly chosen in interval around its present Value plus-minus Step. If next value will get out physical borders (Min - Max) established by user it will get the corresponding border value.
    • Random Gauss - next try value is chosen around vantage point proportionally normal probability with standard deviation equal current Step
    •  Slope local - next point for all coefficients are taken as their current Value algebraic plus current Step. Until next point is happen better fit the procedure is repeat itself. If tried point is not better fit one of the duty coefficient step is reverse sign, shrunken in absolute value and tried again from last best fitting point.
    • Leo method - is our proprietary algorithm. The chose of the next tried points are based on the information of the history of search procedure.

    Depend on the profile of multidimensional space deviation(C1,C2...Cn) any of the presented schemes could have advantages or disadvantages in finding global minimum in sense of rate of arriving to local minimum and probability to settle down in global valley. Really it is impossible to offer general recommendation but to try all of them with different Fetch setting: Try (fast), Normal, Detail (slow). The difference between this settings is in general words in numbers of unsuccessful attempts to find next best vector of fitting coefficients until to shrink steps and ratio to shrink them (steps).

    The procedure to find best fit will stop automatically when absolute values of all Steps will be less then given by user Stop condition or user can brake the process manually.

    Screenshots of the LeoStatistic software:
    click on picture to enlarge

    Building histograms
    Building histogram

    Distribution of two variables.
    Distribution of two variables.

    Approximation (constructor style interface).
    (constructor style interface).

    3D view.
    3D view.

    DOW trend.
    DOW trend.

    Signals revealing
    Signals revealing.

    Near neighbors method
    Near neighbors method.

    Harmonic analysis.
    Harmonic analysis.

    Fit with free format formula.
    Fit with free format formula.

    Curve fit of crystal growth rate.
    Curve fit of crystal growth rate.

    Get data from image file.
    Get data from image file.

    Data analysis  Crystal growth simulation  Internet robot  Photoshop and image analyzer  NetCDF editor  Calculator
    Software archive  Expert database  Photo album  Maverick thoughts  Open forum  Search for cheap sale 
    Home  Products  Partners  Service  Contact
    Copyright by LeoKrut