drift

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADWIN

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

ADWIN (Adaptive Windowing) はアダプティブウィンドウによるドリフト検出 A. Bifet, R. Gavalda (2007) "Learning from time-changing data with adaptive windowing"

func NewADWIN

func NewADWIN(options ...ADWINOption) *ADWIN

NewADWIN は新しいADWINを作成

func (*ADWIN) GetMean

func (adwin *ADWIN) GetMean() float64

GetMean は現在のウィンドウの平均を返す

func (*ADWIN) GetWidth

func (adwin *ADWIN) GetWidth() int

GetWidth は現在のウィンドウ幅を返す

func (*ADWIN) Reset

func (adwin *ADWIN) Reset()

Reset はADWINをリセット

func (*ADWIN) Update

func (adwin *ADWIN) Update(value float64) bool

Update は新しい値でADWINを更新

type ADWINOption

type ADWINOption func(*ADWIN)

ADWINOption はADWINの設定オプション

func WithADWINDelta

func WithADWINDelta(delta float64) ADWINOption

WithADWINDelta は信頼度パラメータを設定

func WithADWINMaxBuckets

func WithADWINMaxBuckets(max int) ADWINOption

WithADWINMaxBuckets は最大バケット数を設定

type DDM

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

DDM (Drift Detection Method) is a concept drift detection method Proposed in J. Gama, P. Medas, G. Castillo, P. Rodrigues (2004) "Learning with Drift Detection"

func NewDDM

func NewDDM(options ...DDMOption) *DDM

NewDDM creates a new DDM instance

func (*DDM) GetStatistics

func (ddm *DDM) GetStatistics() DDMStatistics

GetStatistics は現在の統計情報を返す

func (*DDM) Reset

func (ddm *DDM) Reset()

Reset はドリフト検出器をリセット

func (*DDM) Update

func (ddm *DDM) Update(correct bool) *DriftDetectionResult

Update updates the drift detector with prediction results correct: whether the prediction was correct return: drift detection result

func (*DDM) UpdateWithError

func (ddm *DDM) UpdateWithError(error float64) *DriftDetectionResult

UpdateWithError はエラー値でドリフト検出器を更新

func (*DDM) UpdateWithPrediction

func (ddm *DDM) UpdateWithPrediction(predicted, actual float64) *DriftDetectionResult

UpdateWithPrediction は予測値と実際値でドリフト検出器を更新

type DDMOption

type DDMOption func(*DDM)

DDMOption is a DDM configuration option

func WithDDMMinNumInstances

func WithDDMMinNumInstances(n int) DDMOption

WithDDMMinNumInstances sets the minimum number of samples

func WithDDMOutControlLevel

func WithDDMOutControlLevel(level float64) DDMOption

WithDDMOutControlLevel sets the out-of-control level

func WithDDMWarningLevel

func WithDDMWarningLevel(level float64) DDMOption

WithDDMWarningLevel sets the warning level

type DDMStatistics

type DDMStatistics struct {
	NumInstances    int     // サンプル数
	NumErrors       int     // エラー数
	ErrorRate       float64 // エラー率
	StdDev          float64 // 標準偏差
	MinErrorRate    float64 // 最小エラー率
	MinStdDev       float64 // 最小標準偏差
	WarningDetected bool    // 警告検出フラグ
	DriftDetected   bool    // ドリフト検出フラグ
}

DDMStatistics はDDMの統計情報

type DriftDetectionResult

type DriftDetectionResult struct {
	WarningDetected bool    // Whether warning was detected
	DriftDetected   bool    // Whether drift was detected
	ErrorRate       float64 // Current error rate
	ConfidenceLevel float64 // Confidence level
}

DriftDetectionResult represents the result of drift detection

type DriftDetector

type DriftDetector interface {
	// Update は新しい値でドリフト検出器を更新
	Update(value float64) bool

	// Reset はドリフト検出器をリセット
	Reset()
}

DriftDetector はドリフト検出器の共通インターフェース

Jump to

Keyboard shortcuts

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