You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by "Makoto Yui (Jira)" <ji...@apache.org> on 2019/10/31 07:47:00 UTC
[jira] [Updated] (HIVEMALL-274) Wrong target variable name in the
step-by-step tutorial
[ https://issues.apache.org/jira/browse/HIVEMALL-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Makoto Yui updated HIVEMALL-274:
--------------------------------
Fix Version/s: 0.6.0
> Wrong target variable name in the step-by-step tutorial
> -------------------------------------------------------
>
> Key: HIVEMALL-274
> URL: https://issues.apache.org/jira/browse/HIVEMALL-274
> Project: Hivemall
> Issue Type: Bug
> Reporter: Aki Ariga
> Assignee: Makoto Yui
> Priority: Minor
> Fix For: 0.6.0
>
>
> In the step-by-step tutorial, the target column name of regression should be `num_purchases` instead of `label`.
> {code:java}
> create table if not exists regressor as
> select
> train_regressor(
> features, -- feature vector
> num_purchases, -- target value
> '-loss_function squared -optimizer AdaGrad -regularization l2' -- hyper-parameters
> ) as (feature, weight)
> from
> training
> ;
> {code}
> {code:java}
> with features_exploded as (
> select
> id,
> extract_feature(fv) as feature,
> extract_weight(fv) as value
> from
> training t1
> LATERAL VIEW explode(features) t2 as fv
> ),
> predictions as (
> select
> t1.id,
> sum(p1.weight * t1.value) as predicted_num_purchases
> from
> features_exploded t1
> LEFT OUTER JOIN regressor p1 ON (t1.feature = p1.feature)
> group by
> t1.id
> )
> select
> rmse(t1.predicted_num_purchases, t2.num_purchases) as rmse,
> mae(t1.predicted_num_purchases, t2.num_purchases) as mae
> from
> predictions t1
> join
> training t2 on (t1.id = t2.id)
> ;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)