Iterative RELIEF (I-RELIEF)

class mlpy.Irelief(T=1000, sigma=1.0, teta=0.001)

Iterative RELIEF for Feature Weighting.

Example:

>>> from numpy import *
>>> from mlpy import *
>>> x = array([[1.1, 2.1, 3.1, -1.0],  # first sample
...            [1.2, 2.2, 3.2, 1.0],   # second sample
...            [1.3, 2.3, 3.3, -1.0]]) # third sample
>>> y = array([1, 2, 1])               # classes
>>> myir = Irelief()                   # initialize irelief class
>>> myir.weights(x, y)                 # compute feature weights
array([ 0.,  0.,  0.,  1.])

Initialize the Irelief class.

Input

  • T - [integer] (>0) max loops
  • sigma - [float] (>0.0) kernel width
  • teta - [float] (>0.0) convergence parameter
weights(x, y)

Return feature weights.

Input

  • x - [2D numpy array float] (sample x feature) training data
  • y - [1D numpy array integer] (two classes) classes

Output

  • fw - [1D numpy array float] feature weights
exception mlpy.SigmaError

Sigma Error

Sigma parameter is too small.

[Sun07]Yijun Sun. Iterative RELIEF for Feature Weighting: Algorithms, Theories, and Applications. IEEE Trans. Pattern Anal. Mach. Intell. 29(6): 1035-1051, 2007.

Previous topic

Feature Weighting

Next topic

Discrete Wavelet Transform (DWT)

This Page