flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andralungu <...@git.apache.org>
Subject [GitHub] flink pull request: Hits
Date Wed, 03 Jun 2015 22:38:33 GMT
Github user andralungu commented on a diff in the pull request:

    https://github.com/apache/flink/pull/765#discussion_r31677964
  
    --- Diff: flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/HITS.java
---
    @@ -0,0 +1,180 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.graph.library;
    +import org.apache.flink.api.common.aggregators.LongSumAggregator;
    +import org.apache.flink.api.common.functions.MapFunction;
    +import org.apache.flink.graph.Edge;
    +import org.apache.flink.graph.Graph;
    +import org.apache.flink.graph.GraphAlgorithm;
    +import org.apache.flink.graph.Vertex;
    +import org.apache.flink.graph.spargel.MessageIterator;
    +import org.apache.flink.graph.spargel.MessagingFunction;
    +import org.apache.flink.graph.spargel.VertexUpdateFunction;
    +import org.apache.flink.graph.utils.Hits;
    +
    +import java.io.Serializable;
    +
    +
    +/**
    + *
    + * This class implements the HITS algorithm by using flink Gelly API
    + *Hyperlink-Induced Topic Search (HITS; also known as hubs and authorities) is a link
analysis algorithm that rates Web pages,
    + *developed by Jon Kleinberg.
    + *
    + * The algorithm performs a series of iterations, each consisting of two basic steps:
    + *
    + * Authority Update: Update each node's Authority score to be equal to the sum of the
Hub Scores of each node that
    + * points to it.
    + * That is, a node is given a high authority score by being linked from pages that are
recognized as Hubs for information.
    + * Hub Update: Update each node's Hub Score to be equal to the sum of the Authority Scores
of each node that it
    + * points to.
    + * That is, a node is given a high hub score by linking to nodes that are considered
to be authorities on the subject.
    + *
    + * The Hub score and Authority score for a node is calculated with the following algorithm:
    + *  *Start with each node having a hub score and authority score of 1.
    + *  *Run the Authority Update Rule
    + *  *Run the Hub Update Rule
    + *  *Normalize the values by dividing each Hub score by square root of the sum of the
squares of all Hub scores, and
    + *   dividing each Authority score by square root of the sum of the squares of all Authority
scores.
    + *  *Repeat from the second step as necessary.
    + *
    + * http://en.wikipedia.org/wiki/HITS_algorithm
    --- End diff --
    
    I would add an @see annotation for the link here, check the community detection library
method. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message