graph

package
v0.0.0-...-7e3a63a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package graph contains code and logic for computing the [Markov cluster](https://micans.org/mcl/) from a graph of keywords with edges weighted by the similarity scores among them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterGroup

type ClusterGroup struct {
	Name     string
	Keywords []string
}

ClusterGroup is a cluster of highly-related keywords with respect to the similarity of their SERP members

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

Graph builds a network of keywords and their relationship to other keywords with respect to the similarity of their SERPs

func New

func New(options ...Option) *Graph

New creates a new Graph configured by options

func (Graph) FindClusters

func (g Graph) FindClusters(kd rankings.KeywordData) ([]ClusterGroup, error)

FindClusters adds gathered SERP data to a graph, computes the RBO weights among all SERPs, and returns clusters of keywords whose SERP members are similar

type Option

type Option func(g *Graph)

Option configures a graph

func WithClusterInflation

func WithClusterInflation(i int) Option

WithClusterInflation configures the graph to use the specified inflation value to compute graph clusters

func WithClusterMaxIterations

func WithClusterMaxIterations(i int) Option

WithClusterMaxIterations configures the graph to limit the number of computation steps used when computing graph clusters

func WithClusterPower

func WithClusterPower(p int) Option

WithClusterPower configures the graph to use the specified power value to compute graph clusters

func WithRBOPValue

func WithRBOPValue(p float64) Option

WithRBOPValue configures the graph to use the specified RBO probability value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL