You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemall.apache.org by my...@apache.org on 2019/10/31 07:44:52 UTC

[incubator-hivemall] branch master updated: [HIVEMALL-274] Fix wrong column name of train_regressor() in tutorial

This is an automated email from the ASF dual-hosted git repository.

myui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git


The following commit(s) were added to refs/heads/master by this push:
     new c73ecde  [HIVEMALL-274] Fix wrong column name of train_regressor() in tutorial
c73ecde is described below

commit c73ecde40d661effaac51ca4cbb2d1ba0ea5ef51
Author: Aki Ariga <ar...@treasure-data.com>
AuthorDate: Thu Oct 31 16:44:44 2019 +0900

    [HIVEMALL-274] Fix wrong column name of train_regressor() in tutorial
    
    ## What changes were proposed in this pull request?
    
    Fix document bug reported in HIVEMALL-274
    
    ## What type of PR is it?
    
    Documentation
    
    ## What is the Jira issue?
    
    https://issues.apache.org/jira/projects/HIVEMALL/issues/HIVEMALL-274
    
    ## How was this patch tested?
    
    N/A
    
    ## 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?
    - [ ] Did you run system tests on Hive (or Spark)?
    
    Author: Aki Ariga <ar...@treasure-data.com>
    
    Closes #210 from chezou/HIVEMALL-274.
---
 docs/gitbook/supervised_learning/tutorial.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/docs/gitbook/supervised_learning/tutorial.md b/docs/gitbook/supervised_learning/tutorial.md
index 11dc1c8..6715390 100644
--- a/docs/gitbook/supervised_learning/tutorial.md
+++ b/docs/gitbook/supervised_learning/tutorial.md
@@ -360,8 +360,8 @@ create table if not exists regressor as
 select
   train_regressor(
     features, -- feature vector
-    label, -- target value
-    '-loss_function squared -optimizer AdaGrad -regularization l2' -- hyper-parameters
+    num_purchases, -- target value
+    '-loss_function squared -optimizer AdaGrad' -- hyper-parameters
   ) as (feature, weight)
 from
   training
@@ -444,8 +444,8 @@ predictions as (
     t1.id
 )
 select
-  rmse(t1.predicted_num_purchases, t2.label) as rmse,
-  mae(t1.predicted_num_purchases, t2.label) as mae
+  rmse(t1.predicted_num_purchases, t2.num_purchases) as rmse,
+  mae(t1.predicted_num_purchases, t2.num_purchases) as mae
 from
   predictions t1
 join
@@ -455,9 +455,9 @@ join
 
 Output is like:
 
-|rmse|	mae|
+|rmse|mae|
 |---:|---:|
-|10.665060285725504|	8.341085218265652|
+|9.411633136764399|7.124141833186149|
 
 ## Next steps