Table Of Contents

Previous topic

analyzers Package

Next topic

indexers Package

This Page

experimenters Package

experimenters Package

aggregator Module

Aggregating experimenters.

class vis.analyzers.experimenters.aggregator.ColumnAggregator(index, settings=None)[source]

Bases: vis.analyzers.experimenter.Experimenter

Experiment that aggregates data from all columns of a DataFrame, a list of DataFrame objects, or a list of Series, into a single Series. Aggregation is done through addition. If a DataFrame has a column with the name u'all', it will not be included in the aggregation.

run()[source]

Run the ColumnAggregator experiment.

Returns:A Series with an index that is the combination of all indices of the provided pandas objects, and the value is the sum of all values in the pandas objects.
Return type:pandas.Series

frequency Module

Experimenters that deal with the frequencies (number of occurrences) of events.

class vis.analyzers.experimenters.frequency.FrequencyExperimenter(index, settings=None)[source]

Bases: vis.analyzers.experimenter.Experimenter

Calculate the number of occurrences of things found in an index.

default_settings = {}
possible_settings = []
run()[source]

Run the FrequencyExperimenter.

Returns:The result of the experiment. Data is stored such that column labels correspond to the part (combinations) totalled in the column, and row labels correspond to a type of the kind of objects found in the given index. Note that all columns are totalled in the “all” column, and that not every part combination will have every interval; in case an interval does not appear in a part combination, the value is numpy.NaN.
Return type:pandas.DataFrame
vis.analyzers.experimenters.frequency.experimenter_func(obj)[source]

Used by the FrequencyExperimenter to calculate the frequencies of things in an index.

Parameters:obj (tuple of (anything, pandas.Series)) – An identifier plus the results of an indexer.
Returns:An identifier plus the result of this indexation. In the series, the index is the names of objects found in the inputted series, and the value is the number of occurrences. The first element is the first element given here, used for identification purposes.
Return type:tuple of (anything, pandas.Series)

template Module

Template for writing a new experimenter. Use this class to help write a new :class`Experimenter` subclass. The TemplateExperimenter does nothing, and should only be used by programmers.

class vis.analyzers.experimenters.template.TemplateExperimenter(index, settings=None)[source]

Bases: vis.analyzers.experimenter.Experimenter

Template for an Experimenter subclass.

default_settings = {}

The default values for settings named in possible_settings. If a setting doesn’t have a value in this constant, then it must be specified to the constructor at runtime, or the constructor should raise a RuntimeException.

possible_settings = [u'fake_setting']

This is a list of basestrings that are the names of the settings used in this experimenter. Specify the types and reasons for each setting as though it were an argument list, like this:

Parameters:u’fake_setting’ (boolean) – This is a fake setting.
run()[source]

Run an experiment on a piece.

Returns:The result of the experiment. Each experiment should describe its data storage.
Return type:pandas.Series or pandas.DataFrame