I am trying to use the scoring tool to generate predictions using the model I built with the Linear Regression tool. The problem is, one of my explanatory variables is a lagged dependent variable so I need each new prediction to automatically feed into the lagged dependent variable field for the scoring tool to work
With my input data, I defined by lag field using the Multi-Row Formula tool:
if [RecordID] = 1 then 0.0013 else [Row-1:NLdiff] endif
However, this formula isn't translating forward when new NLdiff values are scored. I'm thinking I have to create a batch macro of some sort but I don't know where to start. Any help is appreciated here!
Solved! Go to Solution.
What was your reasoning behind that? It looks like that just changed the name of the "Predicted" field to "Predicted_X", so I ran into the same issue. It's only iterating once and I can't seem to figure out why
I tried to modify it even further to union everything so the output is exactly the same as the initial input except now Lag_Y has the extra value (so the scoring tool should be able to calculate a Predicted_X for that row as well). However, I feel like my input tool is not actually picking up my output for whatever reason. I have a file input within my macro input tool (with my original data) with the idea that this is only going to be used for the first iteration, and the remaining iterations will use the I Output data. But is this not correct? I'm afraid I'm resetting everything by having a file input
Thanks again for all the help here, I really appreciate it!
I figured it out! My macro was fine I was just not executing it correctly (I didn't realize you needed a separate workflow to run it...oops)
Thanks again for all the help!!! It helped so much
🙂Yeh you need to run the macro from another workflow but glad you figured that out and it worked in the end. Let me know how your other workflows come along.
User | Count |
---|---|
91 | |
79 | |
62 | |
36 | |
36 |