[
https://issues.apache.org/jira/browse/HIVEMALL-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16868433#comment-16868433
]
ASF GitHub Bot commented on HIVEMALL-258:
-----------------------------------------
myui commented on pull request #194: [HIVEMALL-258] Add UDF to convert
feature/label in Libsvm format
URL: https://github.com/apache/incubator-hivemall/pull/194
## What changes were proposed in this pull request?
Add UDF to convert feature/label in Libsvm format
## What type of PR is it?
Feature
## What is the Jira issue?
https://issues.apache.org/jira/browse/HIVEMALL-258
## How was this patch tested?
unit tests and manual tests
## How to use this feature?
```
Usage:
select to_libsvm_format(array('apple:3.4','orange:2.1'))
> 6284535:3.4 8104713:2.1
select to_libsvm_format(array('apple:3.4','orange:2.1'), '-features 10')
> 3:2.1 7:3.4
select to_libsvm_format(array('7:3.4','3:2.1'), 5.0)
> 5.0 3:2.1 7:3.4
```
## Checklist
(Please remove this section if not needed; check `x` for YES, blank for NO)
- [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 UDF to convert feature/label in Libsvm format
> -------------------------------------------------
>
> Key: HIVEMALL-258
> URL: https://issues.apache.org/jira/browse/HIVEMALL-258
> Project: Hivemall
> Issue Type: Improvement
> Reporter: Makoto Yui
> Assignee: Makoto Yui
> Priority: Minor
> Fix For: 0.6.0
>
>
> Add to_libsvm_format UDF something as follows:
> {code:sql}
> select
> to_libsvm_format(features, label) as libsvm
> from
> input
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)