Github user myui commented on the issue:

    https://github.com/apache/incubator-hivemall/pull/58
  
    ```sql
    WITH testing_fm_exploded as (
      select
        t1.rowid, 
        t2.i,
        t2.j,
        t2.Xi,
        t2.Xj
      from
        testing t1
        LATERAL VIEW ffm_pairs(features) t2 as i, j, Xi, Xj
    )
    select
      ffm_predict( -- UDAF
        t1.Xi,
        t1.Xj,
        p1.Wi,
        p1.Vi, -- Vij
        p2.Vi  -- Vji
      ) as predicted
    from 
      testing_fm_exploded t1
      LEFT OUTER JOIN fm_model p1 ON (p1.i = t1.i)
      LEFT OUTER JOIN fm_model p2 ON (p2.i = t1.j and p2.modelid = p1.modelid)  
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to