scoring

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

README

$$ f(x) = \int_{-\infty}^\infty \hat f(\xi) e^{2 \pi i \xi x} d\xi $$

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RangeProcessor

type RangeProcessor struct {
	Min, Max float64
}

RangeProcessor 示例处理器

func (*RangeProcessor) Process

func (p *RangeProcessor) Process(data interface{}) (float64, error)

type ScoreCalculator added in v0.1.5

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

ScoreCalculator 评分系统

func NewScoreCalculator added in v0.1.5

func NewScoreCalculator() *ScoreCalculator

NewScoreCalculator 创建评分系统实例

func (*ScoreCalculator) AddComponent added in v0.1.5

func (s *ScoreCalculator) AddComponent(name string, score float64, customWeight ...float64) error

AddComponent 添加评分组件(可选自定义权重)

func (*ScoreCalculator) CalculateWeightedScore added in v0.1.5

func (s *ScoreCalculator) CalculateWeightedScore() (float64, error)

CalculateWeightedScore 计算加权总分

func (*ScoreCalculator) WeightDistribution added in v0.1.5

func (s *ScoreCalculator) WeightDistribution() map[string]float64

WeightDistribution 获取权重分布

type ScoreComponent

type ScoreComponent struct {
	Name         string  // 维度名称
	CustomWeight float64 // 自定义权重(仅当IsAutoWeight=false时有效)
	Score        float64 // 得分(0-100)
	IsAutoWeight bool    // 是否自动分配权重
}

ScoreComponent 评分项结构体

type ThresholdProcessor

type ThresholdProcessor struct {
	Threshold float64
}

ThresholdProcessor 阀值处理器

func (*ThresholdProcessor) Process

func (p *ThresholdProcessor) Process(data interface{}) (float64, error)

Jump to

Keyboard shortcuts

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