Class DeepWalk<V,​E>

    • Field Detail

      • STATUS_UPDATE_FREQUENCY

        public static final int STATUS_UPDATE_FREQUENCY
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeepWalk

        public DeepWalk()
    • Method Detail

      • getWindowSize

        public int getWindowSize()
      • getLearningRate

        public double getLearningRate()
      • setLearningRate

        public void setLearningRate​(double learningRate)
      • initialize

        public void initialize​(IGraph<V,​E> graph)
        Initialize the DeepWalk model with a given graph.
      • initialize

        public void initialize​(int[] graphVertexDegrees)
        Initialize the DeepWalk model with a list of vertex degrees for a graph.
        Specifically, graphVertexDegrees[i] represents the vertex degree of the ith vertex
        vertex degrees are used to construct a binary (Huffman) tree, which is in turn used in the hierarchical softmax implementation
        Parameters:
        graphVertexDegrees - degrees of each vertex
      • fit

        public void fit​(IGraph<V,​E> graph,
                        int walkLength)
        Fit the model, in parallel. This creates a set of GraphWalkIterators, which are then distributed one to each thread
        Parameters:
        graph - Graph to fit
        walkLength - Length of rangom walks to generate
      • fit

        public void fit​(GraphWalkIteratorProvider<V> iteratorProvider)
        Fit the model, in parallel, using a given GraphWalkIteratorProvider.
        This object is used to generate multiple GraphWalkIterators, which can then be distributed to each thread to do in parallel
        Note that fit(IGraph, int) will be more convenient in many cases
        Note that initialize(IGraph) or initialize(int[]) must be called first.
        Parameters:
        iteratorProvider - GraphWalkIteratorProvider
        See Also:
        fit(IGraph, int)