ai

package
v0.0.0-...-c8d5bbb Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const RETRY_LIMIT int = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type AI

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

func New

func New(aiConnStr, redisAddr string) *AI

func (*AI) Analyze

func (self *AI) Analyze(s models.SensorData, family string) (models.LocationAnalysis, error)

func (*AI) AnalyzeSensorData

func (self *AI) AnalyzeSensorData(s models.SensorData, family string) (aidata models.LocationAnalysis, err error)

func (*AI) Calibrate

func (self *AI) Calibrate(locationMeasurements []*database.LocationMeasurements, family string, crossValidation ...bool) error

func (*AI) Get

func (self *AI) Get(key string, v interface{}) error

func (*AI) Set

func (self *AI) Set(key string, v interface{}) error

type AnalysisResponse

type AnalysisResponse struct {
	Data    models.LocationAnalysis `json:"analysis"`
	Message string                  `json:"message"`
	Success bool                    `json:"success"`
}

type CalibrationModel

type CalibrationModel struct {
	Id                       int                                      `json:"id"`
	ProbabilityMeans         []float64                                `json:"probability_means"`
	ProbabilitiesOfBestGuess []float64                                `json:"probabilities_of_best_guess"`
	PercentCorrect           float64                                  `json:"percent_correct"`
	AccuracyBreakdown        map[string]float64                       `json:"accuracy_breakdown"`
	PredictionAnalysis       map[string]map[string]map[string]int     `json:"prediction_analysis"`
	AlgorithmEfficacy        map[string]map[string]models.BinaryStats `json:"algorithm_efficacy"`
	CalibrationTime          time.Time                                `json:"calibration_time"`
	CreateAt                 time.Time                                `json:"create_at"`
	UpdateAt                 time.Time                                `json:"update_at"`
}

type ClassifyPayload

type ClassifyPayload struct {
	Sensor models.SensorData `json:"sensor_data"`
}

type Pair

type Pair struct {
	Key   string
	Value float64
}

type PairList

type PairList []Pair

func (PairList) Len

func (p PairList) Len() int

func (PairList) Less

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

func (PairList) Swap

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

Directories

Path Synopsis
_old
learning
nb1
nb2

Jump to

Keyboard shortcuts

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