Suppose you had a database in which 4 tables with data. Let's call them table A,B,C,D.
In each of those 4 tables the common field is the date field, because all tables hold events that have occurred on a specific date. It is likely but not mandatory or guaranteed, that every date is present, events within the database occur every day. Each table also holds "a value" which is related to that date.
There is a fifth table which holds "results", table E.
Now, the data in table E are "measurements". Values in table E are measured on a daily basis. But: the data in tables A till D is of influence to the result that will be measured on a given day in table E. We do not know exactly in which way, we do not know the formula of the relationship. The factors that are in table A,B,C,D relate in some way also to eachother. Relationship also unknown, or at least, not exactly known. But we DO know, how in the past the changes in values within the data in table A, B, C, and D resulted in a value in table E. That is historical information. We can see what value table E held on f.e. sunday, and we can then see how the value in tables A till D were on sunday. We could then calculate the relation between A and B, A and C, A and D, and so on, and relate that to the result that has been measured in table E.
What I want to do, is by extrapolation predict the results in each table A, B, C and D, and from that extrapolation, again by extrapolation, predict the results in table E for, let's say, a week.
Now, because of the fact that the data in tables A till D are also dependend of several factors outside the tables known, I think it is difficult to use a linear extrapolation function. It could be that we need to use a second order polynome or an exponential function to extrapolate, but, I do not know for sure how to proceed.
How would you guys tackle this problem, and what kind of code would be needed to solve the puzzle?
In each of those 4 tables the common field is the date field, because all tables hold events that have occurred on a specific date. It is likely but not mandatory or guaranteed, that every date is present, events within the database occur every day. Each table also holds "a value" which is related to that date.
There is a fifth table which holds "results", table E.
Now, the data in table E are "measurements". Values in table E are measured on a daily basis. But: the data in tables A till D is of influence to the result that will be measured on a given day in table E. We do not know exactly in which way, we do not know the formula of the relationship. The factors that are in table A,B,C,D relate in some way also to eachother. Relationship also unknown, or at least, not exactly known. But we DO know, how in the past the changes in values within the data in table A, B, C, and D resulted in a value in table E. That is historical information. We can see what value table E held on f.e. sunday, and we can then see how the value in tables A till D were on sunday. We could then calculate the relation between A and B, A and C, A and D, and so on, and relate that to the result that has been measured in table E.
What I want to do, is by extrapolation predict the results in each table A, B, C and D, and from that extrapolation, again by extrapolation, predict the results in table E for, let's say, a week.
Now, because of the fact that the data in tables A till D are also dependend of several factors outside the tables known, I think it is difficult to use a linear extrapolation function. It could be that we need to use a second order polynome or an exponential function to extrapolate, but, I do not know for sure how to proceed.
How would you guys tackle this problem, and what kind of code would be needed to solve the puzzle?
Comment