skmultilearn.neurofuzzy package

The skmultilearn.neurofuzzy module provides implementations of neural network and fuzzy approaches to multi-label classification.

Currently the available classes include:

  • MLARAM - A Multi-Label Hierarchical ARAM Neural Network
class skmultilearn.neurofuzzy.MLARAM(vigilance=0.9, threshold=0.02, neurons=[])[source]

Bases: skmultilearn.base.base.MLClassifierBase

HARAM: A Hierarchical ARAM Neural Network for Large-Scale Text Classification

See http://dx.doi.org/10.1109/ICDMW.2015.14

Parameters:

vigilance : vigilance parameter for adaptiv resonance theory networks, controls how large a hyperbox can be, 1 it is small (no compression), 0 should assume all range. Normally set between 0.8 and 0.999, it is dataset dependent. It is responsible for the creation of the prototypes, therefore training of the network.

threshold : controls how many prototypes participate by the prediction, can be changed at the testing phase.

tneurons : if the network should inherited neurons (prototypes) from another network

tdebug : set debug modus

BRIEFNAME = 'ML-ARAM'
fit(X, y)[source]

Fit classifier with training data

Parameters:
  • X (matrix (n_samples, n_features)) – input features
  • y (dense or sparse matrix of {0, 1} (n_samples, n_labels)) – binary indicator matrix with label assignments
Returns:

Fitted instance of self

predict(X)[source]

Predict labels for X

Parameters:X (dense or sparse matrix (n_samples, n_features)) – input features
Returns:binary indicator matrix with label assignments
Return type:array of arrays of int (n_samples, n_labels)
predict_proba(X)[source]

Predict probabilities of label assignments for X

Parameters:X (dense or sparse matrix (n_samples, n_labels)) – input features
Returns:matrix with label assignment probabilities
Return type:array of arrays of float (n_samples, n_labels)
reset()[source]

Submodules

skmultilearn.neurofuzzy.MLARAMfast module

class skmultilearn.neurofuzzy.MLARAMfast.MLARAM(vigilance=0.9, threshold=0.02, neurons=[])[source]

Bases: skmultilearn.base.base.MLClassifierBase

HARAM: A Hierarchical ARAM Neural Network for Large-Scale Text Classification

See http://dx.doi.org/10.1109/ICDMW.2015.14

Parameters:

vigilance : vigilance parameter for adaptiv resonance theory networks, controls how large a hyperbox can be, 1 it is small (no compression), 0 should assume all range. Normally set between 0.8 and 0.999, it is dataset dependent. It is responsible for the creation of the prototypes, therefore training of the network.

threshold : controls how many prototypes participate by the prediction, can be changed at the testing phase.

tneurons : if the network should inherited neurons (prototypes) from another network

tdebug : set debug modus

BRIEFNAME = 'ML-ARAM'
fit(X, y)[source]

Fit classifier with training data

Parameters:
  • X (matrix (n_samples, n_features)) – input features
  • y (dense or sparse matrix of {0, 1} (n_samples, n_labels)) – binary indicator matrix with label assignments
Returns:

Fitted instance of self

predict(X)[source]

Predict labels for X

Parameters:X (dense or sparse matrix (n_samples, n_features)) – input features
Returns:binary indicator matrix with label assignments
Return type:array of arrays of int (n_samples, n_labels)
predict_proba(X)[source]

Predict probabilities of label assignments for X

Parameters:X (dense or sparse matrix (n_samples, n_labels)) – input features
Returns:matrix with label assignment probabilities
Return type:array of arrays of float (n_samples, n_labels)
reset()[source]
class skmultilearn.neurofuzzy.MLARAMfast.Neuron(startpoint, label)[source]

Bases: future.types.newobject.newobject