[
https://issues.apache.org/jira/browse/HIVEMALL-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16981420#comment-16981420
]
ASF GitHub Bot commented on HIVEMALL-121:
-----------------------------------------
myui commented on pull request #216: [HIVEMALL-121] Add -libsvm formatting
option to feature_hashing UDF
URL: https://github.com/apache/incubator-hivemall/pull/216
## What changes were proposed in this pull request?
Add `-libsvm` formatting option for `feature_hashing
## What type of PR is it?
Improvement
## What is the Jira issue?
https://issues.apache.org/jira/browse/HIVEMALL-121
## How was this patch tested?
unit tests, manual tests on EMR
## How to use this feature?
```sql
select feature_hashing(array('aaa:1.0','aaa','bbb:2.0'), '-libsvm');
> ["4063537:1.0","4063537:1","8459207:2.0"]
select feature_hashing(array('aaa:1.0','aaa','bbb:2.0'), '-features 10
-libsvm');
> ["1:2.0","7:1.0","7:1"]
```
## Checklist
- [x] Did you apply source code formatter, i.e., `./bin/format_code.sh`, for
your commit?
- [x] Did you run system tests on Hive (or Spark)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add `-libsvm` formatting option for `feature_hashing`
> -----------------------------------------------------
>
> Key: HIVEMALL-121
> URL: https://issues.apache.org/jira/browse/HIVEMALL-121
> Project: Hivemall
> Issue Type: Improvement
> Reporter: Makoto Yui
> Assignee: Makoto Yui
> Priority: Minor
> Fix For: 0.6.0
>
>
> `-libsvm` option is expected that always outputs
> {code}(<index>:<value>)*{code}
> {code:sql}
> select feature_hashing(features, '-libsvm') from train;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)