posterior

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassCases added in v0.4.0

type ClassCases map[ft.Class]int

ClassCases is the number of cases per each class. They are used for the final calculation of the prior odds.

type Likelihoods added in v0.4.0

type Likelihoods map[ft.Class]map[ft.Feature]float64

Likelihoods are the odds for each feachure for every class. The multiplication product of all odds is the final odds for a class.

type Odds

type Odds struct {
	// ClassOdds provide odds for each class.
	ClassOdds map[ft.Class]float64

	// MaxClass is the class with the best odds.
	MaxClass ft.Class

	// MaxOdds is the odds of the MaxClass
	MaxOdds float64

	ClassCases
	Likelihoods
}

Odds are calculated posterior odds to classify an entity according to all the used features it contains.

MaxOdds provides the best odds calculated for an entity and MaxClass provide the category with the best odds. This class is the desired classification result.

Jump to

Keyboard shortcuts

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