GammaGammaModelIndividual.predict#
- GammaGammaModelIndividual.predict(X_pred, extend_idata=True, **kwargs)#
Uses model to predict on unseen data and return point prediction of all the samples. The point prediction for each input row is the expected output value, computed as the mean of MCMC samples.
- Parameters:
- X_predarray_like
ifsklearnisavailable,otherwisearray,shape(n_pred,n_features) The input data used for prediction.
- extend_idata
Booleandeterminingwhetherthepredictionsshouldbeaddedtoinferencedataobject. Defaults to True.
- **kwargs: Additional arguments to pass to sample_posterior_predictive method
- X_predarray_like
- Returns:
- y_pred
ndarray,shape(n_pred,) Predicted output corresponding to input X_pred.
- y_pred
Examples
>>> model = MyModel() >>> idata = model.fit(X,y) >>> x_pred = [] >>> prediction_data = pd.DataFrame({'input':x_pred}) >>> pred_mean = model.predict(prediction_data)