CoreMathRFM

package
v5.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func (*Core) GetScore

func (t *Core) GetScore(recency float64, frequency float64, monetary float64, weightR float64, weightF float64, weightM float64, minValR float64, minValF float64, minValM float64, maxValR float64, maxValF float64, maxValM float64) (score float64)

GetScore 获取分数底层方法 注意,R指标方向和F、M指标相同

func (*Core) GetScoreByWeight

func (t *Core) GetScoreByWeight(recency float64, frequency float64, monetary float64, widthNum int64) (score float64)

GetScoreByWeight 获取分数

func (*Core) GetScoreR2 added in v5.2.37

func (t *Core) GetScoreR2(recency float64, frequency float64, monetary float64, weightR float64, weightF float64, weightM float64, minValR float64, minValF float64, minValM float64, maxValR float64, maxValF float64, maxValM float64) (score float64)

GetScoreR2 反转R指标 R指标与FM不同,尤其可用于

func (*Core) GetWeight

func (t *Core) GetWeight(num int64) Weight

GetWeight 获取权重

func (*Core) SetDataRange

func (t *Core) SetDataRange(rMin float64, fMin float64, mMin float64, rMax float64, fMax float64, mMax float64)

SetDataRange 设置数据范围

func (*Core) SetWeight

func (t *Core) SetWeight(weightList []Weight)

SetWeight 设置权重

type Weight

type Weight struct {
	//编号
	// 可用于系统固化ID、排序、具体业务逻辑等
	Number int64
	//权重值
	R float64
	F float64
	M float64
}

Jump to

Keyboard shortcuts

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