GlobalMean

class GlobalMean[source]

Bases: ModelMixin

Computes mean value from the training data and then uses it to make predictions.

Note

Current implementation does not scale to datasets larger than RAM.

fit(traindata, valdata=None)[source]

Model fitting.

Parameters:
  • traindata (PlibData[DataFrame]) – Training data.

  • valdata (Optional[PlibData[DataFrame]]) – Validation data.

predict(data_x, batch_size=None)[source]

Predict values for the given data.

Parameters:
  • data_x (PlibData[DataFrame]) – Data without labels i.e. without the “values” column.

  • batch_size (Optional[int]) – Batch size for prediction. Some models might not support this functionality

Return type:

ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]]

Returns:

Value predictions.