Skip to content

ENH: Refactor function representation code and explanation #177

@timmens

Description

@timmens

While the behavior of get_value_function_representation is wonderful it is hard to understand and in the future we might need a more general version of it (not only for the value function but for general functions). I suggest following high-level steps that should be taken in get_function_representation:

  1. Since the function will be called with named arguments, we need to know which
    argument name corresponds to which array dimension.

  2. Because array elements are retrieved through indexing, but a function is called
    on levels, we require a mapping from levels to indices.

  3. For continuous variables, we want to be able to call the function on levels that
    do not occur in the grid. This requires us to interpolate the function values on
    said grid.

Helper functions need to be renamed accordingly.

Task

  • Refactor function_representation.py module
  • Redesign function_representation.ipynb notebook

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions