classify

package
v0.0.0-...-0c34cbd Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSV = DataFormat("csv")
)
View Source
const (
	KMeans = AlgorithmType("kmeans")
)
View Source
const (
	KMeansDefaultRound = 30
)

Variables

This section is empty.

Functions

func OutputResult

func OutputResult(data [][]float32, output io.Writer, precision int) error

Types

type Algorithm

type Algorithm interface {
	Run(data [][]float32, numClass int, context interface{}) (centers [][]float32, class []int)
}

聚类算法接口

func GetAlgorithm

func GetAlgorithm(algorithmType AlgorithmType) Algorithm

type AlgorithmType

type AlgorithmType string

type DataFileLoader

type DataFileLoader interface {
	Load(fin io.Reader, removeColumn []int) ([][]float32, error)
}

func NewDataLoader

func NewDataLoader(format DataFormat) DataFileLoader

type DataFormat

type DataFormat string

type KMeansContext

type KMeansContext struct {
	Round int
}

Jump to

Keyboard shortcuts

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