cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

MultiTabled fits

Jbryant61
4-Participant

MultiTabled fits

I want to be able to take several tables of data and perform a (Gaussian) fit to any of the tables that I specify. I have tried to include the table and x & y columns as variables in the SSE and Minerr but it doesn't like it. I guess this is bad practice.

Thanks
Jason
14 REPLIES 14
StuartBruff
23-Emerald III
(To:Jbryant61)

On 9/28/2009 5:59:29 AM, Jbryant61 wrote:
== I want to be able to take several tables of data and perform a (Gaussian) fit to any of the tables that I specify. I have tried to include the table and x & y columns as variables in the SSE and Minerr but it doesn't like it. I guess this is bad practice.

You had two sets of parentheses in the defintion of SSE, an extraneous x as an argument and hadn't defined xcol, ycol or Table.

Stuart
Jbryant61
4-Participant
(To:StuartBruff)

Thanks Stuart.

Why do you need to define Table = First, when later on tasble is a variable. does it then get overwritten by that variable i.e. when Table = second>
StuartBruff
23-Emerald III
(To:Jbryant61)

On 9/28/2009 7:26:12 AM, Jbryant61 wrote:
== Why do you need to define Table = First, when later on tasble is a variable.

It's the rules, man.

I don't know the mechanics of the solve block. I guess it's because Mathcad evaluates a worksheet sequentially and has to have some information about the variables within the solve block before it gets to the function definition at the end of the block. Perhaps Tom can throw more light on this.

== does it then get overwritten by that variable i.e. when Table = second>

Yes, or rather the value of that variable.

Stuart
Jbryant61
4-Participant
(To:StuartBruff)

It doesn't seem to be fitting that well.

J

On 9/28/2009 7:53:21 AM, Jbryant61 wrote:
>It doesn't seem to be fitting
>that well.
>
>J
______________________________

It does not fit at all because of the model.

Jean



On 9/28/2009 7:53:21 AM, Jbryant61 wrote:
>It doesn't seem to be fitting that well.

1. You include Table as argument for minerr. I think that you can't.

2. Same guess for all Tables doesn't look good idea, even looks working.

Alvaro.


On 9/29/2009 8:42:56 PM, adiaz wrote:
>On 9/28/2009 7:53:21 AM, Jbryant61
>wrote:
>>It doesn't seem to be fitting that well.
>
>1. You include Table as argument for
>minerr. I think that you can't.
>
>2. Same guess for all Tables doesn't
>look good idea, even looks working.
>
>Alvaro.
>____________________________

I have posted the fit for one. Jason model is NFG ! The 2nd one was not done, letting Jason to do and reply, but he didn't... conclusively accepting the new model. Same guesses for only two fits is too early to decide, but for this type of function it can be predicted good for an infinite family of fit.

jmG




On 9/29/2009 8:42:56 PM, adiaz wrote:
>On 9/28/2009 7:53:21 AM, Jbryant61
>wrote:
>>It doesn't seem to be fitting that well.
>
>1. You include Table as argument for
>minerr. I think that you can't.
>
>2. Same guess for all Tables doesn't
>look good idea, even looks working.
>
>Alvaro.
>_______________________

Enjoy this most gorgeous tool !

Read the note why it is designed so. For the two data sets, it does no care much initials. It will fit any family as long as the family is a "family". Adapt your model, bingo. That tool was posted yesterday, what's the idea about arguing what should be what or not what ? Not any top part looking parabolic can be declared "Gaussian", proof attached.

jmG

On 9/29/2009 11:15:29 PM, jmG wrote:
>Read the note why it is designed so. ...

Gaussian fit is supossed to obey a gaussian distribution. Changing the function you change the theory in the original background, which I don't know, but for some reason the collab needs to "adjust" the data set to a gaussian curve, no other.

Seems that the question is if points can fail in the curve or not. If the data is experimental then must have errors (Must). So, points can't fail all just in the curve.

But: this isn't the objective. What the collab needs are the values for mu, sigma, a (and d, which complicate the situation). Those parameters have a very good interpretation in physics.

Probably for the data set there are better models that describes their particular values. But is usual asuming gaussian distributions because the theory are well know, so, don't need to reconstruct a lot of calculus for each distribution in particular.

If the collab change the gaussian distribution for the given data for other then I assume that have any theory that support this. I know why sometimes data is assumed with a gaussian distribution, but in the funcition that you propose can't identify the meaning of the parameters that you're looking for.

Also there are an important point here: �why the collected data can be adjusted by a function? Is that desirable? One thing is the physical model of the phenomena under study, and the laws that this obey, and other is incluiding the measures errors (usualy associated with a gaussian distribution) in the same law. If do that you don't have a general law, only one applicable when observer make the same mistakes that the original laboratorist make the first time.

Alvaro.

On 9/29/2009 11:15:29 PM, jmG wrote:
>Read the note why it is designed so. ...
______________________

Why the multi-fit-family solver is designed so is for the reason of on-line use as a supervisory tool to operators. It has nothing to do with your theory about "Gaussian". Who cares if the points are so bad and of no fittable "Gaussian" shape. With only 5 points, and unless they are "Gaussian or like", the fit reveals that they aren't "Gaussian" at all ! The conclusion is that the project is all scrap, one way or another ... so well evidenced. If one assumes a "Gaussian" to pass across the bush, then the measured if they are true ... the equipment is all scrap.

Take a few minutes and revisit my work sheet and conclude that the fit is done, both looking like "Gaussian" but unfortunately not of the supposed so simple "Gausian" as it was assumed .



jmG

PS: Let Jason understand something in there.

On 9/28/2009 5:59:29 AM, Jbryant61 wrote:
>I want to be able to take
>several tables of data and
>perform a (Gaussian) fit to
>any of the tables that I
>specify. I have tried to
>include the table and x & y
>columns as variables in the
>SSE and Minerr but it doesn't
>like it. I guess this is bad
>practice.
>
>Thanks
>Jason

Try using a quantile/quantile method as an alternative. These are 'order statistics' and are usually not subject to the effects of outliers.

Philip Oakley

On 9/28/2009 5:59:29 AM, Jbryant61 wrote:
>I want to be able to take several tables of
>data and perform a (Gaussian) fit to any of
>the tables that I specify.
_______________________

That's what the model does:

Fit any length of Y 1rst column parent values,
and any length of Y 2nd column parent values,
...thus fitting "several tables" of parent values.
There is no point arguing the data should be like this or like that. For the given two sets, they are just as they are, i.e: perfectly fitted with a single "non-Gausian model". That the points should be "Gaussian" is none of our business, because they are collected and not "Gaussian". What can you do: tell Jason he does not know how to collect points or generate "Gaussian" data sets. He may also have more families that will not be of same model! ? We know nothing about the project.



jmG


Jbryant61
4-Participant
(To:ptc-1368288)

Thanks everyone, Jean thanks for your non-gaussian equation - this has gone into my collection.

The data is experimental and isn't actually meaningful at the moment as I am just setting up an experiment, so theres no need for me to actually use the values from the fits just yet, ~I need to dig into the model to get the proper fucntion.

My aim was to be able to mimic fitting packages such as Origin or Easyplot wher eyou enter data and can select a fit and display on the same graph. This can be done for many data sets.

(i don't always have the same x values, so I just use a different table).

Its sort of nearly there, it would be nice to also allow for different fits to be applied to different data. I assume in this case the SSE and MINER would have to be sequential? or could you do it programmatically.

Thanks
Jason

Thanks everyone, Jean thanks for your non-gaussian equation ...
Its sort of nearly there, it would be nice to also allow for different
fits to be applied to different data.
_________________________

SSE/Minerr & and Genfit are of no technical use, they are not because Paul W. made us discover or re-discover the best of Mathcad very powerful Given solver . SSE/Minerr or SSE/minimize would be temporary on weighted fit. No attempt was made to include the weighed fit in the PWMinerr block... RemToDo. Applying different models like you do with ORIGINLAB is only valid for "fittable" data set, which is the case in general and would probably satisfy a not too demanding user (maybe like you). But remember that the LM single fitter [ORIGINLAB] fails in many cases, and remember also that some data set can't be fitted at all except manually. Personally, I have no desire for things that can't be done but the idea of it is great as a specific tool for specific user. I had a Mathcad scratch sheet doing that, but it became soon very cumbersome and concluded that having several instances of ORIGINLAB or Mathcad was much more practical. EasyPlot is not given ($) ...
The gear you have in hand is appropriate for a family of "fittable data" tough on some family it will or might fail because of the difficulty to initialise. I had cases that toke days !!! to initialise. Another important point is the rows/cols selection submatrix style, the little programme Data(data,r0,r1,c0,c1) will just do that for you on contiguous columns, thus simplifying the "forLoop List" in the core of the main work sheet.

Jean

Announcements

Top Tags