pycram.parameterizer#
Classes#
Class that generates possible parameters for a plan. |
Functions#
|
Convert a leaf type to a random events variable. |
Module Contents#
- class pycram.parameterizer.Parameterizer#
Class that generates possible parameters for a plan.
This class can be used to generate possible parameters for a plan from probability distributions.
- plan: pycram.plan.Plan#
The plan to generate the parameters for.
- parameters: Dict[pycram.plan.DesignatorNode, Any]#
A dictionary that maps all nodes in the plan that hold actions to their parameters.
- variables_of_node: Dict[pycram.plan.DesignatorNode, List[random_events.variable.Variable]]#
A dictionary that maps all nodes in the plan that hold actions to the variables that describe that nodes parameters.
- __post_init__()#
- property variables: List[random_events.variable.Variable]#
- Returns:
The variables for all parameters in the plan.
- get_variable(name: str) random_events.variable.Variable#
- Parameters:
name – The name of the variable.
- Returns:
The variable.
- make_parameters()#
Create the parameters for all relevant nodes in the plan.
- make_variables()#
Create the variables for all relevant parameters in the plan.
- plan_from_sample(model: probabilistic_model.probabilistic_model.ProbabilisticModel, sample: numpy.array) pycram.plan.Plan#
Create a sequential plan from a sample of all parameters.
- Parameters:
model – The model that generated the sample.
sample – The sample to generate the plan from.
- Returns:
The executable, sequential plan
- create_fully_factorized_distribution() probabilistic_model.probabilistic_circuit.nx.probabilistic_circuit.ProbabilisticCircuit#
- Returns:
a fully factorized distribution for the plan.
- create_restrictions() random_events.product_algebra.SimpleEvent#
- Returns:
The restrictions present in the plan as random event.
- pycram.parameterizer.leaf_type_to_variable(name: str, leaf_type: Type) random_events.variable.Variable#
Convert a leaf type to a random events variable. :param name: The name of the variable. :param leaf_type: The leaf type. :return: The variable.