\seekquarry\yioop\library\classifiersFeatureSelection

This is an abstract class that specifies an interface for selecting top features from a dataset.

Each FeatureSelection class implements a select method that takes a Features instance and returns a mapping from a subset of the old feature indices to new ones.

Summary

Methods
Properties
Constants
__construct()
buildMap()
select()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(array  $parameters = array()) 

Sets any passed runtime parameters.

Parameters

array $parameters

optional associative array of parameters to replace the default ones with

buildMap()

buildMap(object  $selected) : array

Constructs a map from old feature indices to new ones according to a max-heap of the most informative features. Always keep feature index 0, which is used as an intercept term.

Parameters

object $selected

max heap containing entries ordered by informativeness and feature index.

Returns

array —

associative array mapping a subset of the original feature indices to the new indices

select()

select(object  $features) : array

Computes the top features of a Features instance, and returns a mapping from a subset of those features to new contiguous indices. The mapping allows documents that have already been mapped into the larger feature space to be converted to the smaller feature space, while keeping the feature indices contiguous (e.g., 1, 2, 3, 4, .

.. instead of 22, 35, 75, ...).

Parameters

object $features

Features instance

Returns

array —

associative array mapping a subset of the original feature indices to new indices