sideop Package

sideop Package

Created on Sun Aug 18 22:31:59 2013


This module contains the filter and regressor managers used by task to apply the filters and regressors. Both those classes use a side operation manager that implement the generic functions. This allow to apply the filters and regressors as early as possible during the triplet generation to optimise the performances.

filter_manager Module

Created on Mon Dec 16 05:00:10 2013

@author: Thomas Schatz

class ABXpy.sideop.filter_manager.FilterManager(db_hierarchy, on, across, by, filters)[source]

Bases: ABXpy.sideop.side_operations_manager.SideOperationsManager

Manage the filters on attributes (on, across, by) or elements (A, B, X) for further processing

ABX_filter(on_across_by_values, db, triplets)[source]
A_filter(on_across_by_values, db, indices)[source]
B_filter(on_across_by_values, db, indices)[source]
X_filter(on_across_by_values, db, indices)[source]
classify_generic(elements, db_fun, db_variables)[source]
generic_filter(by_values, db)[source]
ABXpy.sideop.filter_manager.vectorial_filter(generator, indices)[source]


To allow a lazy evaluation of the filter, the context is filtered explicitly which acts on the generator by a side-effect (dict being mutable in python)

regressor_manager Module

Created on Mon Dec 16 05:01:53 2013

author:Thomas Schatz
class ABXpy.sideop.regressor_manager.RegressorManager(db, db_hierarchy, on, across, by, regressors)[source]

Bases: ABXpy.sideop.side_operations_manager.SideOperationsManager

Manage the regressors on attributes (on, across, by) or elements (A, B, X) for further processing

classify_generic(elements, db_fun, db_variables)[source]
fetch_regressor_info(field, reg_id)[source]
set_ABX_regressors(on_across_by_values, db, triplets)[source]
set_A_regressors(on_across_by_values, db, indices)[source]
set_B_regressors(on_across_by_values, db, indices)[source]
set_X_regressors(on_across_by_values, db, indices)[source]

side_operations_manager Module

Created on Tue Nov 12 06:39:40 2013

author:Thomas Schatz
Class working closely with providing services for it, specifically by:
  • finding out the best point to execute side-operations (such as filtering and regressor generation) in the ABX task computation flow:

    • basically the more related a given side-operation is to the on/across/by structure of the ABX task, the earlier it can be executed and the lowest the computational cost is
  • providing methods to actually carry out these side-operations at the point in the execution flow to which they were attributed

class ABXpy.sideop.side_operations_manager.SideOperationsManager(db_hierarchy, on, across, by)[source]

Bases: object

add(db_fun, name=None)[source]

Check that something with a AX, AB or 1, 2 extension is an on/across descendant and a correct one for AX, AB.

classify_ABX(elements, db_fun, db_variables)[source]

the only left extensions are either not descendant of on/across/by or descendant of across and _X or descendant of on and _B (i.e. _2) we do not try to batch the _2 because we think they are potentially too small, instead if necessary we should batch several consecutive calls

classify_by(elements, db_fun, db_variables)[source]

Detect operations that depend only on a variable that is used as a ‘by’ factor in the ABX task.

classify_generic(elements, db_fun, db_variables)[source]

Detect operations that can be applied directly to the columns of the original database. This is subclass specific...

classify_on_across_by(elements, db_fun, db_variables)[source]

Detect operations that can be applied at the level of an on/across/by block during the generation of the ABX triplets.

evaluate_A_B_X(name, on_across_by_values, db, indices, context=None)[source]
evaluate_generic(by_values, db, context=None)[source]

Get radical and suffix part of a context_variable.


Get radical and suffix part for every context_variable, returns the set of the encountered couples.

set_ABX_context(context, db, triplets)[source]
set_A_B_X_context(context_field, context, stage, db, indices)[source]
set_by_context(context, stage, by_values)[source]
set_generic_context(context, stage, db)[source]
set_on_across_context(context, stage, on_across_values)[source]
ABXpy.sideop.side_operations_manager.result_generator(db_funs, context)[source]
ABXpy.sideop.side_operations_manager.singleton_result_generator(db_funs, context)[source]