Page 1 of 1

Get predictions from the model with many alternatives

Posted: 06 Jul 2020, 20:37
by houman1372
Hi
I have a question. After running the attached file I want to get predictions from the model. I use following commands:

predictions_base = apollo_prediction(model, apollo_probabilities, apollo_inputs)
summary(predictions_base[,3:ncol(predictions_base)])

But it causes this error:
Error in apollo_mnl(mnl_settings, functionality) :
Each element of "V" for model component "MNL" needs to be a scalar or a vector/matrix/cube with one row per observation in the "database"

I have used prediction before and it worked properly but when we use multiple data sources in this new way it comes to the error.
Is there any update on this?

Best,
Houman

Re: Get predictions from the model with many alternatives

Posted: 07 Jul 2020, 22:31
by stephanehess
Hi Houman

thanks, this was a bug. This has been fixed in v.0.1.1 which you can download from the website (http://www.apollochoicemodelling.com/code.html)

Best wishes

Stephane

Re: Get predictions from the model with many alternatives

Posted: 24 Aug 2020, 14:14
by houman1372
Hi Stephane

There is the same problem in the apollo_outOfSample function. I would appreciate if you debug this error:

Error in apollo_mnl(mnl_settings, functionality) :
Each element of "V" for model component "MNL" needs to be a scalar or a vector/matrix/cube with one row per observation in the "database"

Regards,
Houman

Re: Get predictions from the model with many alternatives

Posted: 28 Aug 2020, 18:58
by dpalma
Hi Houman,

Thank you for pointing this out. The problem has been resolved in the newly uploaded version in the webpage (new v0.1.1). You can download it from:
http://www.apollochoicemodelling.com/code.html

Best wishes
David