示例#1
0
    def _check(self):
        # super(GaussianHMM, self)._check()
        self.means_ = np.asarray(self.means_)
        self.n_features = self.means_.shape[1]
        if self.covariance_type not in COVARIANCE_TYPES:
            raise ValueError(
                'covariance_type must be one of {0}'.format(COVARIANCE_TYPES))

        _validate_covars(self._covars_, self.covariance_type,
                         self.n_components)
示例#2
0
    def _check(self):
        super(GaussianHMM, self)._check()

        self.means_ = np.asarray(self.means_)
        self.n_features = self.means_.shape[1]

        if self.covariance_type not in COVARIANCE_TYPES:
            raise ValueError('covariance_type must be one of {0}'
                             .format(COVARIANCE_TYPES))

        _validate_covars(self._covars_, self.covariance_type,
                         self.n_components)
示例#3
0
 def _set_covars(self, covars):
     covars = np.asarray(covars)
     _validate_covars(covars, self._covariance_type, self.n_components)
     self._covars_ = covars.copy()
 def _set_covars(self, covars):
     covars = np.asarray(covars)
     _validate_covars(covars, self._covariance_type, self.n_components)
     self._covars_ = covars.copy()