probability

package
v0.0.0-...-b7c488f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package probability provides abstractions for how to compute how precision and recall is affected by measurements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeSHExplosionsRatio

type MeSHExplosionsRatio struct{}

MeSHExplosionsRatio measures and predicts how mesh explosions affect retrieval performance.

func (MeSHExplosionsRatio) ComputeAdditionProbability

func (MeSHExplosionsRatio) ComputeAdditionProbability(m float64) PredictionPair

ComputeAdditionProbability NOT IMPLEMENTED.

func (MeSHExplosionsRatio) ComputeReductionProbability

func (MeSHExplosionsRatio) ComputeReductionProbability(m float64) PredictionPair

ComputeReductionProbability NOT IMPLEMENTED.

func (MeSHExplosionsRatio) Execute

Execute returns the ratio of exploded MeSH queries to the number of total MeSH queries in the search strategy.

func (MeSHExplosionsRatio) Name

func (MeSHExplosionsRatio) Name() string

Name NOT IMPLEMENTED.

type PredictionPair

type PredictionPair struct {
	PrecisionProbability float64
	RecallProbability    float64
}

PredictionPair is a pair of probabilities from predicting how a Measurement affects retrieval performance.

func NewPredictionPair

func NewPredictionPair(precision, recall float64) PredictionPair

NewPredictionPair creates a new prediction pair.

type ProbabilisticMeasurement

type ProbabilisticMeasurement struct {
	analysis.Measurement
	Probability
}

ProbabilisticMeasurement is the union of a Measurement (i.e. some QPP), and a probability (i.e. how this Measurement affects retrieval performance).

func NewProbabilisticMeasurement

func NewProbabilisticMeasurement(measurement Probability) ProbabilisticMeasurement

NewProbabilisticMeasurement creates a ProbabilisticMeasurement from a single Probability implementation. This should ensure at compile-time that a ProbabilisticMeasurement has both interfaces implemented.

func (ProbabilisticMeasurement) Compute

Compute a Measurement and how that Measurement affects precision and recall.

type ProbabilisticMeasurementResult

type ProbabilisticMeasurementResult struct {
	Measurement float64
	Addition    PredictionPair
	Reduction   PredictionPair
}

ProbabilisticMeasurementResult is the result of computing the likelihoods for how a Measurement affects precision and recall by adding and removing to a query.

type Probability

type Probability interface {
	ComputeAdditionProbability(float64) PredictionPair
	ComputeReductionProbability(float64) PredictionPair
}

Probability computes the likelihood of a Measurement affecting precision and recall. For this interface to be properly implemented, four probabilities must be implemented: how the Measurement affects retrieval performance if the query is rewritten to add or remove aspects that increase or decrease the Measurement.

Jump to

Keyboard shortcuts

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