gemseo.mlearning.data_formatters.moe_data_formatters module#

Data formatters for mixture of experts.

class MOEDataFormatters[source]#

Bases: RegressionDataFormatters

Data formatters for mixture of experts.

classmethod format_predict_class_dict(func)[source]#

Make an array-based function be called with a dictionary of NumPy arrays.

Parameters:

func (Callable[[MOERegressor, RealArray, Any, ...], ndarray]) -- The function to be called; it takes a NumPy array in input and returns a NumPy array.

Returns:

A function making a function work with either a NumPy data array or a dictionary of NumPy data arrays indexed by variables names. The evaluation will have the same type as the input data.

Return type:

Callable[[MOERegressor, DataType, Any, ...], DataType]