package lnsmote

import "git.sr.ht/~shulhan/pakakeh.go/lib/mining/resampling/lnsmote"

Package lnsmote implement the Local-Neighborhood algorithm from the paper,

Maciejewski, Tomasz, and Jerzy Stefanowski. "Local neighbourhood extension of SMOTE for mining imbalanced data." Computational Intelligence and Data Mining (CIDM), 2011 IEEE Symposium on. IEEE, 2011.

Index

Types

type Runtime

type Runtime struct {

	// ClassMinor the minority sample in dataset that we want to
	// oversampling.
	ClassMinor string `json:"ClassMinor"`

	// OutliersFile if its not empty then outliers will be saved in file
	// specified by this option.
	OutliersFile string `json:"OutliersFile"`

	// Runtime of SMOTE, since this module extend the SMOTE method.
	smote.Runtime
	// contains filtered or unexported fields
}

Runtime parameters for input and output.

func New

func New(percentOver, k, classIndex int, classMinor, outliers string) (
	lnsmoteRun *Runtime,
)

New create and return new LnSmote object.

func (*Runtime) Init

func (in *Runtime) Init(dataset tabula.DatasetInterface)

Init will initialize LNSmote runtime by checking input values and set it to default if not set or invalid.

func (*Runtime) Resampling

func (in *Runtime) Resampling(dataset tabula.DatasetInterface) (
	e error,
)

Resampling will run resampling process on dataset and return the synthetic samples.

Source Files

lnsmote.go

Version
v0.60.0 (latest)
Published
Feb 1, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
9 hours ago

Tools for package owners.