fuzzy-rough-learn API#

This is the full API documentation of fuzzy-rough-learn.

Classifiers#

FRNN

Implementation of Fuzzy Rough Nearest Neighbour (FRNN) classification.

FROVOCO

Implementation of the Fuzzy Rough OVO COmbination (FROVOCO) ensemble classifier [Rcffc929d1d8e-1].

FRONEC

Implementation of the Fuzzy ROugh NEighbourhood Consensus (FRONEC) multilabel classifier.

NN

Implementation of Nearest Neighbour (NN) classification.

Data descriptors#

ALP

Implementation of the Average Localised Proximity (ALP) data descriptor [R4d6affda87e1-1].

CD

Implementation of the Centre Distance (CD) data descriptor.

EIF

Wrapper for the Extended Isolation Forest (IF) data descriptor [R4b2ca5e1909e-1].

IF

Wrapper for the Isolation Forest (IF) data descriptor [R288ff40200ea-1] implemented in scikit-learn.

LNND

Implementation of the Localised Nearest Neighbour Distance (LNND) data descriptor [Rdc09924e667a-1]_[Rdc09924e667a-2]_.

LOF

Implementation of the Local Outlier Factor (LOF) data descriptor [Race47188aa49-1].

MD

Implementation of the Mahalanobis Distance (MD) data descriptor [Rddee2b422011-1].

NND

Implementation of the Nearest Neighbour Distance (NND) data descriptor, which goes back to at least [R2f1514802a03-1].

SVM

Wrapper for the Support Vector Machine (SVM) data descriptor [R52cd54939bff-1] with gaussian kernel, implemented in scikit-learn.

Regressors#

FRNN

Implementation of the Fuzzy Rough Nearest Neighbour (FRNN) regressor [R889f5cf58f8d-1].

Feature preprocessors#

Linear normalisers#

LinearNormaliser

Linearly transforms all features by normalising a measure of dispersion and a measure of location, ensuring that for each feature, that measure of dispersion becomes 1 and that measure of location becomes 0.

IQRNormaliser

Implementation of the interquartile range (IQR) normaliser.

MaxAbsNormaliser

Implementation of the maximum absolute value normaliser.

RangeNormaliser

Implementation of the range normaliser.

Standardiser

Implementation of the standard deviation normaliser, or standardiser.

Other#

FRFS

Implementation of the Fuzzy Rough Feature Selection (FRFS) preprocessor.

VectorSizeNormaliser

Rescales each instance (seen as a vector) to a fixed size.

Instance preprocessors#

FRPS

Implementation of the Fuzzy Rough Prototype Selection (FRPS) preprocessor.

Other#

Array functions#

div_or

Divides x by y, replacing np.nan values with fallback.

first

Returns the k first values of a along the specified axis.

greatest

Returns the k greatest values of a along the specified axis, in order.

last

Returns the k last values of a along the specified axis, in reverse order.

least

Returns the k least values of a along the specified axis, in order.

remove_diagonal

Remove the diagonal from a square array.

soft_head

Calculates the soft head of an array.

soft_max

Calculates the soft maximum of an array.

soft_min

Calculates the soft minimum of an array.

soft_tail

Calculates the soft tail of an array.

Dispersion measures#

interquartile_range

Distance between the first and the third quartile; range of the central half of the data.

maximum_absolute_value

Maximum distance from 0.

standard_deviation

Square root of the sum of the squared distances to the mean.

total_range

Distance between the smallest and largest value.

Location measures#

maximum

Greatest value.

mean

Sum of all values divided by the number of values.

median

Middle value after sorting all values by size, or mean of the two middle values.

midhinge

Mean of the first and third quartiles.

midrange

Mean of the minimum and maximum.

minimum

Least value.

Nearest neighbour search algorithms#

BallTree

Nearest neighbour search with a Ball tree.

KDTree

Nearest neighbour search with a KD-tree.

Parametrisations#

log_multiple

Function to obtain multiples of the logarithm of other numbers.

multiple

Function to obtain multiples of other numbers.

T-norms#

goguen_t_norm

x * y; also known as product t-norm.

heyting_t_norm

min(x, y); also known as Gödel or minimum t-norm.

lukasiewicz_t_norm

max(x + y - 1, 0)

Transformations#

contract

Strictly order-preserving function from [-∞, ∞] to [0, 1] that sends -∞, -c, 0, c, to 0, 0.25, 0.5, 0.75, 1, respectively.

shifted_reciprocal

Order-reversing function from [0, ∞) to [0, 1] that sends x to 1/(1 + x/c).

truncated_complement

Order-reversing function from [0, ∞) to [0, 1] that sends x to max(0, 1 - x).

Vector size measures#

MinkowskiSize

Family of vector size measures of the form `(x1**p + x2**p + .

Weights#

Weights

Abstract base class for parametrisable weights functions.

ConstantWeights

(1/4, 1/4, 1/4, 1/4) Also known as mean weights, as they compute the unweighted mean.

ExponentialWeights

(8/15, 4/15, 2/15, 1/15) Exponentially decreasing weights with parametrisable base.

LinearWeights

(4/10, 3/10, 2/10, 1/10) Also known as additive weights.

QuantifierWeights

Weights that encode a regular non-decreasing quantifier [Rcc56311c3f1f-1].

ReciprocallyLinearWeights

(12/25, 12/50, 12/75, 12/100) Also known as inverse additive weights.