Tables

class getml.pipeline.Tables(targets: Sequence[str], columns: Columns, data: Optional[Sequence[Table]] = None)[source]

This container holds a pipeline’s tables. These tables are build from the columns for which importances can be calculated. The motivation behind this container is to determine which tables are more important than others.

Tables can be accessed by name, index or with a NumPy array. The container supports slicing and can be sorted and filtered. Further, the container holds global methods to request tables’ importances.

Note:

The container is an iterable. So, in addition to filter() you can also use python list comprehensions for filtering.

Example:
all_my_tables = my_pipeline.tables

first_table = my_pipeline.tables[0]

all_but_last_10_tables = my_pipeline.tables[:-10]

important_tables = [table for table in my_pipeline.tables if
table.importance > 0.1]

names, importances = my_pipeline.tables.importances()

Methods

filter(conditional)

Filters the tables container.

importances([target_num, sort])

Returns the importances of tables.

sort([by, key, descending])

Sorts the Tables container.

to_pandas()

Returns all information related to the tables in a pandas DataFrame.

Attributes

names

Holds the names of a Pipeline's tables.

targets

Holds the targets of a Pipeline's tables.