cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "fp-growth",
	Short: "A brief description of your application",
	Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
}

RootCmd represents the base command when called without any subcommands

Functions

func ConstructConditionalSupportCountTables

func ConstructConditionalSupportCountTables(bases ConditionalPatternBases) map[int]SupportCountTable

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func OrderItems

func OrderItems(d DataSet, h HeadTable)

Types

type ConditionalFPTree

type ConditionalFPTree struct {
	Prefix ConditionalItem
	Tree   FPTree
}

func ConstructConditionalFPTrees

func ConstructConditionalFPTrees(bs ConditionalPatternBases, ht ConditionalHeadTables) (res []ConditionalFPTree)

func (*ConditionalFPTree) MineFrequentPatterns

func (c *ConditionalFPTree) MineFrequentPatterns() []Pattern

type ConditionalHeadTable

type ConditionalHeadTable struct {
	Prefix ConditionalItem
	HeadTable
}

func ConstructConditionalHeadTables

func ConstructConditionalHeadTables(bs ConditionalPatternBases, minSup int) []ConditionalHeadTable

type ConditionalHeadTables

type ConditionalHeadTables []ConditionalHeadTable

func ConstructImprovedConditionalHeadTables

func ConstructImprovedConditionalHeadTables(bs ConditionalPatternBases, scts SupportCountTable, minSup int) ConditionalHeadTables

func (ConditionalHeadTables) Get

func (ConditionalHeadTables) GetIndex

func (ht ConditionalHeadTables) GetIndex(item int) int

type ConditionalItem

type ConditionalItem struct {
	Item  int
	Count int
}

type ConditionalPatternBase

type ConditionalPatternBase struct {
	Prefix ConditionalItem
	Bases  [][]ConditionalItem
}

type ConditionalPatternBases

type ConditionalPatternBases []ConditionalPatternBase

func MineConditionalPatternBases

func MineConditionalPatternBases(t FPTree, ht HeadTable) ConditionalPatternBases

type DataSet

type DataSet []Items

type FPTree

type FPTree struct {
	Root *FPTreeNode
}

func NewFPTree

func NewFPTree(ordered DataSet, ht *HeadTable) FPTree

type FPTreeNode

type FPTreeNode struct {
	Item     int
	Count    int
	Link     *FPTreeNode
	Parent   *FPTreeNode
	Children []*FPTreeNode
}

func (*FPTreeNode) MinePatterns

func (f *FPTreeNode) MinePatterns(p ConditionalItem) []Pattern

func (*FPTreeNode) OnlyOneBranch

func (f *FPTreeNode) OnlyOneBranch() bool

func (*FPTreeNode) String

func (f *FPTreeNode) String() string

type HeadTable

type HeadTable []HeadTableRow

func NewHeadTable

func NewHeadTable(db DataSet, minSup int) HeadTable

func (HeadTable) Get

func (p HeadTable) Get(id int) HeadTableRow

func (HeadTable) GetPosition

func (p HeadTable) GetPosition(id int) int

func (HeadTable) Len

func (p HeadTable) Len() int

func (HeadTable) Less

func (p HeadTable) Less(i, j int) bool
func (p HeadTable) SetLink(id int, link *FPTreeNode)

func (HeadTable) Swap

func (p HeadTable) Swap(i, j int)

type HeadTableRow

type HeadTableRow struct {
	Item  int
	Count int
	Link  *FPTreeNode
}

type Items

type Items []int

func (Items) Len

func (s Items) Len() int

func (Items) Swap

func (s Items) Swap(i, j int)

type OrderItemsByHeaderTableWrapper

type OrderItemsByHeaderTableWrapper struct {
	Items
	H HeadTable
}

func (OrderItemsByHeaderTableWrapper) Less

type OrderableItems

type OrderableItems []ConditionalItem

func (OrderableItems) Len

func (p OrderableItems) Len() int

func (OrderableItems) Swap

func (p OrderableItems) Swap(i, j int)

type OrderableItemsWrapper

type OrderableItemsWrapper struct {
	OrderableItems
	HT ConditionalHeadTable
}

func (OrderableItemsWrapper) Less

func (p OrderableItemsWrapper) Less(i, j int) bool

type Pattern

type Pattern struct {
	Pattern Items
	Count   int
}

func Mine

func Mine(db DataSet, minSup int) []Pattern

func MineAllPatterns

func MineAllPatterns(fpt FPTree, patterns []Pattern, minSup int, h HeadTable) []Pattern

func MineAllPatternsImproved

func MineAllPatternsImproved(fpt FPTree, patterns []Pattern, minSup int, h HeadTable, counts SupportCountTable) []Pattern

func MineImproved

func MineImproved(db DataSet, minSup int) []Pattern

type SupportCountTable

type SupportCountTable map[int]map[int]int

func ConstructSupportCountTable

func ConstructSupportCountTable(items []Items) SupportCountTable

func (SupportCountTable) Get

func (s SupportCountTable) Get(i, j int) int

Jump to

Keyboard shortcuts

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