apriori

package
v1.9.11 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apriori

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

func NewApriori

func NewApriori(transactions [][]string) *Apriori

func (*Apriori) Calculate

func (a *Apriori) Calculate(options Options) []RelationRecord

type Options

type Options struct {
	MinSupport    float64 `json:"minSupport"`    // The minimum support of relations (float).
	MinConfidence float64 `json:"minConfidence"` // The minimum confidence of relations (float).
	MinLift       float64 `json:"minLift"`       // The minimum lift of relations (float).
	MaxLength     int     `json:"maxLength"`     // The maximum length of the relation (integer).
}

func NewOptions

func NewOptions(minSupport float64, minConfidence float64, minLift float64, maxLength int) Options

type OrderedStatistic

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

func (OrderedStatistic) GetAdd

func (os OrderedStatistic) GetAdd() []string

func (OrderedStatistic) GetBase

func (os OrderedStatistic) GetBase() []string

func (OrderedStatistic) GetConfidence

func (os OrderedStatistic) GetConfidence() float64

func (OrderedStatistic) GetLift

func (os OrderedStatistic) GetLift() float64

type RelationRecord

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

func (RelationRecord) GetOrderedStatistic

func (r RelationRecord) GetOrderedStatistic() []OrderedStatistic

func (RelationRecord) GetSupportRecord

func (r RelationRecord) GetSupportRecord() SupportRecord

type SupportRecord

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

func (SupportRecord) GetItems

func (sr SupportRecord) GetItems() []string

func (SupportRecord) GetSupport

func (sr SupportRecord) GetSupport() float64

Jump to

Keyboard shortcuts

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