Closed exalate-issue-sync[bot] closed 1 year ago
Wendy commented: I have implemented native multinomial for GLM. However, I encountered the following issues:
I am currently running some performance profile in terms of time and prediction accuracies with datasets of various classes and number of columns. I will put out a report as soon as I get the results.
Based on the current observation, I do not think we will put this into our release.
Thanks, Wendy
Wendy commented: Summary of Run Results for Multinomial GLM
Setup
In this study, we ran multiple multinomial GLM tests off Hadoop with various number of classes and various number of predictor columns in each dataset. The goal here is to investigate the performance in terms of prediction error, logloss, number of iterations run and run time between the original implementation and with the new native implementation.
I have generated multinomial datasets with:
For a fixed number of classes, I generated 10, 50 and 100 predictors. Half the number of predictors are categoricals with 5 levels. This increases the problem complexities as the number of coefficients per class increases as 35 (10 columns), 150 (50 columns) and 300 (100 columns).
There are about 10000000 rows of data per dataset.
The original implementation will update the coefficients of one multinomial class at a time. Hence, it is training the classifier using 1 vs many.
Observations
The native implementation on the other hand will update the coefficients of all the multinomial classes at one shot. In theory this implementation should offer superior performance as you are adjusting the hyperplanes for all the class together in order to minimize your objective function. However, in reality, we encounter the following problems:
Despite the problems, I do notice the following advantages of the native implementation:
Possible next steps
After this study, I have gained more respect for the original implementation. It achieves higher performances while using less memory. The native implementation has the potential to achieve better results. However, the following issues must be resolved:
However, since the performance of current implementation is pretty good at this point, the above enhancement will be of lower priority.
Results:
!image-20200111-000042.jpeg|width=1296,height=312!
!image-20200111-000103.jpeg|width=1296,height=762!
!image-20200111-000114.jpeg|width=1296,height=760!
!image-20200111-000124.jpeg|width=1296,height=750!
!image-20200111-000135.jpeg|width=1296,height=750!
Wendy commented: I have implemented multinomial working on all coefficients for all classes in parallel. However, I do find small gain in time but not in performance. Hence, I am not going to push my fix into our master code for now.
JIRA Issue Migration Info
Jira Issue: PUBDEV-6323 Assignee: Wendy Reporter: Wendy State: Closed Fix Version: 3.28.1.x Attachments: Available (Count: 5) Development PRs: Available
Linked PRs from JIRA
https://github.com/h2oai/h2o-3/pull/3882 https://github.com/h2oai/h2o-3/pull/3414
Attachments From Jira
Attachment Name: image-20200111-000042.jpeg Attached By: Wendy File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-6323/image-20200111-000042.jpeg
Attachment Name: image-20200111-000103.jpeg Attached By: Wendy File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-6323/image-20200111-000103.jpeg
Attachment Name: image-20200111-000114.jpeg Attached By: Wendy File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-6323/image-20200111-000114.jpeg
Attachment Name: image-20200111-000124.jpeg Attached By: Wendy File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-6323/image-20200111-000124.jpeg
Attachment Name: image-20200111-000135.jpeg Attached By: Wendy File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-6323/image-20200111-000135.jpeg
Put it in Tomas original ADMM framework.