I have several sets of data (each for a different chemical in this case), and each data set should follow the same general equation, but the parameters (coefficients) of that equation will be different for each data set. I know how to find an equation to fit one data set at a time, but it will probably not be the best to fit all the other data sets. How can I find the equation that best fits all of the data sets at once? In other words, how can I have Eureqa calculate unique coefficients for each set of data, but keep the equation the same for all of them?
Right now, my data looks like this for three data sets. I have x, y data, and a boolean value to indicate which data set it belongs to.
I am using the following target expression to give it up to three coefficients, but each coefficient is so complicated that Eureqa does not want to put in any coefficients at all:
I've tried using Eureqa several times in the past, but I can never get over this problem so I've never ended up being able to use it. Is there a solution or is Eureqa just limited to one data set at a time?
I created the attached Eureqa file using the data from your post. The file has three searches. Eureqa can be a bit path dependent and multiple searches on the same data can often find a good model for the data faster than allowing a single search to run a long time.
As an example, I'm using the solution with complexity size 29 from the third search. It's not necessarily the best solution for the data, but it has a good form to demonstrate the approach I've taken.
The variables, C_a, C_b, C_c, C_not_a, C_not_b and C_not_c, are classification variables that have a value of 0 or 1 depending on which chemical the corresponding X, Y variables represent.
I've broken the solution down for each chemical as follows:
Even if this approach isn't a solution to your problem, it may give you some ideas on how to develop your own solutions.
------------------------
The forum software won't allow me to upload the Eureqa file.
I've uploaded a text file that has your data in tab delimited form that can be copied and pasted into Eureqa. You can see from looking at the file how multiple classification variables can be placed into a single column.
If you like, I could email the Eureqa file to you.
Thanks CharlesWT! That's an interesting approach - the problem is that different terms in the equation appear/disappear depending on the chemical. I need each chemical to have an equation of precisely the same form, just with different coefficients, and I can't figure out how to make Eureqa find that equation for me. If I just search one chemical at a time, I get an equation that fits the data for that chemical really well, but not necessary all the other ones.
I have a total of 1026 chemicals right now, so it would be really nice to be able to throw all the data into Eureqa (or at least 30 of the most representative ones) and have it find the equation that best fits all of them at once (again, each will have different coefficients).
It seems like Eureqa treats constants just like any other building block, but I would like Eureqa to treat coefficients as dataset-specific values. For example, if I have two data sets that are best fit by two lines, I am now required to run Eureqa on each dataset separately, returning two separate equations (e.g., y=2.34*x+3.43 and y=1.123*x+0.003). But I would rather have it examine both datasets at once and return y=m*x+b. I really don't care what the coefficients are for each dataset - I can easily solve for those using Eureqa or other software later.
This seems like the sort of problem that many other people would have. I am surprised that there is no easy way to do it.