类 Swing

  • 所有已实现的接口:
    Serializable, org.apache.flink.ml.api.AlgoOperator<Swing>, org.apache.flink.ml.api.Stage<Swing>, org.apache.flink.ml.common.param.HasOutputCol<Swing>, org.apache.flink.ml.param.WithParams<Swing>, SwingParams<Swing>

    public class Swing
    extends Object
    implements org.apache.flink.ml.api.AlgoOperator<Swing>, SwingParams<Swing>
    An AlgoOperator which implements the Swing algorithm.

    Swing is an item recall algorithm. The topology of user-item graph usually can be described as user-item-user or item-user-item, which are like 'swing'. For example, if both user u and user v have purchased the same commodity i, they will form a relationship diagram similar to a swing. If u and v have purchased commodity j in addition to i, it is supposed i and j are similar. The similarity between items in Swing is defined as

    $$ w_{(i,j)}=\sum_{u\in U_i\cap U_j}\sum_{v\in U_i\cap U_j}{\frac{1}{{(|I_u|+\alpha_1)}^\beta}}*{\frac{1}{{(|I_v|+\alpha_1)}^\beta}}*{\frac{1}{\alpha_2+|I_u\cap I_v|}} $$

    Note that alpha1 and alpha2 could be zero here. If one of $$|I_u|, |I_v| and |I_u\cap I_v|$$ is zero, then the similarity of i and j is zero.

    See "Large Scale Product Graph Construction for Recommendation in E-commerce" by Xiaoyong Yang, Yadong Zhu and Yi Zhang.

    另请参阅:
    序列化表格
    • 构造器详细资料

      • Swing

        public Swing()
    • 方法详细资料

      • transform

        public org.apache.flink.table.api.Table[] transform​(org.apache.flink.table.api.Table... inputs)
        指定者:
        transform 在接口中 org.apache.flink.ml.api.AlgoOperator<Swing>
      • getParamMap

        public Map<org.apache.flink.ml.param.Param<?>,​Object> getParamMap()
        指定者:
        getParamMap 在接口中 org.apache.flink.ml.param.WithParams<Swing>