Hey @mirraaj, thanks for opening the clear issue. I took a look at RegressionDistribution and think I have an idea of what's going on.
I think the documentation for RegressionDistribution isn't very clear, and you're right, it doesn't seem to have any testing. If you like, we can leave this issue open after we solve the immediate problem you've had to add tests for it.
When Train() is called, it uses the first row of the observations as regressors for LinearRegression. See regression_distribution.hpp line 48. So, basically, the lr object will expect to receive a point to Predict() with one row fewer than RegressionDistribution receives. The only way Log::Assert() will get called in this code path is in LinearRegression::Predict(), so the problem is in that function.
If you can take a look with a debugger (or just print) the sizes of everything when you call lr.Predict(), it should probably become clear exactly what the problem is. Let me know what you find if you do that. :+1:
I can try to work on this issue if no one is currently working on it
Of course馃槄
Most helpful comment
Hey @mirraaj, thanks for opening the clear issue. I took a look at
RegressionDistributionand think I have an idea of what's going on.I think the documentation for
RegressionDistributionisn't very clear, and you're right, it doesn't seem to have any testing. If you like, we can leave this issue open after we solve the immediate problem you've had to add tests for it.When
Train()is called, it uses the first row of the observations as regressors forLinearRegression. Seeregression_distribution.hppline 48. So, basically, thelrobject will expect to receive a point toPredict()with one row fewer thanRegressionDistributionreceives. The only wayLog::Assert()will get called in this code path is inLinearRegression::Predict(), so the problem is in that function.If you can take a look with a debugger (or just print) the sizes of everything when you call
lr.Predict(), it should probably become clear exactly what the problem is. Let me know what you find if you do that. :+1: