midas: github.com/steve0hh/midas Index | Files

package midas

import "github.com/steve0hh/midas"

Index

Package Files

edgehash.go midas.go midasr.go nodehash.go

func Midas Uses

func Midas(src []int, dst []int, times []int, numRows int, numBuckets int) []float64

Takes in a list of source, destination and times to do anomaly score of each edge This function mirrors the implementation of https://github.com/bhatiasiddharth/MIDAS

func MidasR Uses

func MidasR(src []int, dst []int, times []int, numRows int, numBuckets int, factor float64) []float64

type EdgeHash Uses

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

func NewEdgeHash Uses

func NewEdgeHash(numRows int, numBuckets int, m int) *EdgeHash

func (*EdgeHash) Clear Uses

func (e *EdgeHash) Clear()

func (*EdgeHash) GetCount Uses

func (e *EdgeHash) GetCount(a int, b int) float64

func (*EdgeHash) Hash Uses

func (e *EdgeHash) Hash(a int, b int, i int) int

func (*EdgeHash) Insert Uses

func (e *EdgeHash) Insert(a int, b int, weight float64)

func (*EdgeHash) Lower Uses

func (e *EdgeHash) Lower(factor float64)

type MidasModel Uses

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

func NewMidasModel Uses

func NewMidasModel(numRows int, numBuckets int, m int) *MidasModel

Creates a new Midas struct that will enable the use of Fit and FitPredict API.

func (*MidasModel) Fit Uses

func (m *MidasModel) Fit(src, dst, time int)

Fit the source, destination and time to the MidasModel struct similar to the sklearn api

func (*MidasModel) FitPredict Uses

func (m *MidasModel) FitPredict(src, dst, time int) float64

Fit the source, destination and time to the MidasModel struct and calculate the anomaly score

type MidasRModel Uses

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

func NewMidasRModel Uses

func NewMidasRModel(numRows int, numBuckets int, m int, factor float64) *MidasRModel

func (*MidasRModel) Fit Uses

func (m *MidasRModel) Fit(src, dst, time int)

func (*MidasRModel) FitPredict Uses

func (m *MidasRModel) FitPredict(src, dst, time int) float64

type NodeHash Uses

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

func NewNodeHash Uses

func NewNodeHash(numRows int, numBuckets int) *NodeHash

func (*NodeHash) Clear Uses

func (n *NodeHash) Clear()

func (*NodeHash) GetCount Uses

func (n *NodeHash) GetCount(a int) float64

func (*NodeHash) Hash Uses

func (n *NodeHash) Hash(a int, i int) int

func (*NodeHash) Insert Uses

func (n *NodeHash) Insert(a int, weight float64)

func (*NodeHash) Lower Uses

func (n *NodeHash) Lower(factor float64)

Package midas imports 2 packages (graph). Updated 2020-05-07. Refresh now. Tools for package owners.