Module topicnet.cooking_machine.cubes

Cubes and their Strategies

Cube types:


Strategy types:


Cube internal structure

The main cube attributes:

Cube methods worth noticing:


What do you need to create a new cube?

Following this 3 easy steps you will be able to write down your own cube:

  1. Inherit your Cube from BaseCube.

  2. Child class should define following methods __init__, apply, get_jsonable_from_parameters. It is strongly descouraged to change __call__ method.

  3. get_jsonable_from_parameters()[i] corresponds to the same cube step as parameters[i].

Expand source code
from .base_cube import BaseCube, retrieve_score_for_strategy
from .regularizer_cube import RegularizersModifierCube
from .controller_cube import RegularizationControllerCube
from .cube_creator import CubeCreator
from .perplexity_strategy import PerplexityStrategy
from .greedy_strategy import GreedyStrategy
from .strategy import BaseStrategy

Sub-modules

topicnet.cooking_machine.cubes.base_cube
topicnet.cooking_machine.cubes.controller_cube

Allows to add ControllerAgent (with unknown parameters) to the model, which enables user to change tau during the _fit method …

topicnet.cooking_machine.cubes.cube_creator
topicnet.cooking_machine.cubes.greedy_strategy
topicnet.cooking_machine.cubes.perplexity_strategy
topicnet.cooking_machine.cubes.regularizer_cube
topicnet.cooking_machine.cubes.strategy