SlipGURU Dipartimento di Informatica e Scienze dell'Informazione Università Degli Studi di Genova

envop Package

envop Package

Provides concrete implementations of environment–wide operations (envops).

L1L2 Module

Provides concrete functionality for environment–wide operations (envops) related to statistical techniques using l1l2py library.

class kdvs.fw.impl.envop.L1L2.L1L2_UniformExtSplitProvider(**kwargs)

Bases: kdvs.fw.EnvOp.EnvOp

The parametrizable pre–EnvOp (i.e. that will be executed before all computational jobs from statistical techniques for current category) that generates splits from given labels vector, and places the result directly into specific placeholder variable that the statistical technique exposes. This way, any interested statistical technique may share exactly the same split. This approach is used in L1L2_L1L2 and L1L2_RLS techniques so that they can share one uniform external split. To use it, the instance of this class must be configured with the following parameters:

  • ‘enclosingCategorizerID’ – the identifier of the Categorizer on the level this EnvOp will be called
  • ‘extSplitParamName’ – name of the parameter that holds the number of splits to be made (‘the counter’)
  • ‘extSplitPlaceholderParam’ – name of the parameter in statistical technique that will hold the generated split

For instance, if ‘extSplitPlaceholderParam’ equals to ‘splits’, then such parameter must be present during configuration of statistical technique, with initial value None, in configuration file:

  • techConf1 = {..., ‘splits’ : None, ...}

This EnvOp works assuming the following conditions are met:

    1. in all statistical techniques that expose placeholder parameter, the ‘counter’ value is exactly the same
    1. in all categories on current hierarchy level, all data subsets have the same single statistical technique assigned for processing (so we obtain single ‘counter’ value),
    1. there is at least one valid categorizer BELOW the enclosing one with at least one technique that exposes placeholder parameter.

If any of those conditions is NOT met, an Error is raised.

Parameters :

kwargs : dict

actual parameters supplied during instantiation; they will be checked against reference ones; the parameters are: ‘enclosingCategorizerID’, ‘extSplitParamName’, ‘extSplitPlaceholderParam’

Raises :

Error :

if specific version of ‘l1l2py’ library is not present

version = '1.0.5'
uesp_parameters = ('enclosingCategorizerID', 'extSplitParamName', 'extSplitPlaceholderParam')
perform(env)

Perform generation of splits and put them into all statistical techniques that expose certain placeholder parameter. Refer to the comments for the detailed procedure.

Parameters :

env : ExecutionEnvironment

concrete instance of ExecutionEnvironment that will be modified in–place

Raises :

Error :

if the enclosing categorizer was not found

Error :

in the cases explained above

Table Of Contents