def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def initialize(self, init_type = ema_init_type.KMEANS_INITIALIZATION):
        """!
        @brief Calculates initial parameters for EM algorithm: means and covariances using
                specified strategy.