pyxpcm.models.pcm.fit_predict¶
-
pcm.fit_predict(self, ds, features=None, dim=None, inplace=False, name='PCM_LABELS')[source]¶ Estimate PCM parameters and predict classes.
This method add these properties to the PCM object:
llh: The log likelihood of the model with regard to new data
Parameters: - ds: :class:`xarray.Dataset`
The dataset to work with
- features: dict()
Definitions of PCM features in the input
xarray.Dataset. If not specified or set to None, features are identified usingxarray.DataArrayattributes ‘feature_name’.- dim: str
Name of the vertical dimension in the input
xarray.Dataset- inplace: boolean, False by default
If False, return a
xarray.DataArraywith predicted labels If True, return the inputxarray.Datasetwith labels added as a newxarray.DataArray- name: string (‘PCM_LABELS’)
Name of the DataArray holding labels.
Returns: xarray.DataArrayComponent labels (if option ‘inplace’ = False)
- or
xarray.DatasetInput dataset with component labels as a ‘PCM_LABELS’ new
xarray.DataArray(if option ‘inplace’ = True)