FeatureSystem#

class tangles.separations.FeatureSystem(data_size: int)#

Methods

__getitem__()

Get the feature or features as a matrix of indicator columnvectors

add_corner()

Calculate the infimum of two features from the feature system and add this infimum as a

add_features()

Add features to the feature system

add_seps()

Add separations to the separation system

all_feature_ids()

Returns

all_sep_ids()

Returns

assemble_meta_info()

If the user has entered custom meta info for a feature, then that is prioritised before everything else

compute_infimum()

Compute the infimum (intersection) of the given list of features

count_big_side()

Count the number of data points on the big (positive) side of the given separation

crossing_seps()

Generator to get all crossing separations from the list of separations

feature_and_complement_size()

Returns

feature_metadata()

Return a list of all metadata of the feature feature_id

feature_size()

Returns

get_corners()

Calculate the four corners of two features in the feature system

get_feature_ids()

If the features or their inverses are already contained inside of the feature system then return the

get_sep_ids()

If the separations are already contained inside of the separation system then return the

is_le()

Check if feature \(a\) specified by feat_id_a is less than or equal to feature \(b\) specified by feat_id_b,

is_nested()

Check whether two features are nested

is_subset()

Check if the feature feat_id_a is a subset of the feature feat_id_b

metadata_matrix()

Explain the meaning of a feature, generated by repeatedly taking corners of features,

separation_metadata()

Returns the metadata of the separation sep_id

side_counts()

Count the number of data points on each side of the separation

with_array()

Create a new SetSeparationSystem from a separation matrix

with_sparse_array()

Create a new SetSeparationSystem from a sparse separation matrix