Recursive Loop Issues
Hi guys,
I am struggling with a recursive loop.
Task: I have a table with n rows and m columns, containing data points at different time stamps. For each row, I want to find two parameters k and c, which define a function that approximates the m points. To do so, I have an optimization, minimizing the mean squared error.
The issue is that for the row i+1, I need to use the k and c calculated with the data points of row i, as starting point for my i+1 optimization.
How should I set up my loop in such a way that I use one row at a time but I update the initial values of k and c at every iteration?
Do I need a chunk loop to iterate on every row and a recursive loop inside it?
Here’s a sketch of the logic: