Intel® oneAPI Data Analytics Library
Community support for building compute-intensive applications that run fast on Intel® architecture.

em_gmm_dense_batch.py

cn_j_
Beginner
206 Views

Hi,

This question might be for whoever is familiar with the GMM algorithm using EM.

The example has a 'batch' word, and there is a batch class when the line below is called:

# Create algorithm objects to initialize the EM algorithm for the GMM
# computing the number of components using the default method
initAlgorithm = em_gmm.init.Batch(nComponents)

 

class Batch(object):
    r"""Factory class for different types of Batch."""
    def __new__(cls,
                *args, **kwargs):
        if 'fptype' not in kwargs or kwargs['fptype'] == float64:
            if 'method' not in kwargs or kwargs['method'] == defaultDense:
                return Batch_Float64DefaultDense(*args)
        if 'fptype' in kwargs and kwargs['fptype'] == float32:
            if 'method' not in kwargs or kwargs['method'] == defaultDense:
                return Batch_Float32DefaultDense(*args)

        raise RuntimeError("No appropriate constructor found for Batch")

The comment says:

Factory class for different types of Batch.

What exactly does the batch mean here? What are different types of batch?

Also is it related to batch or online training in machine learning, meaning train and update GMM model using data batch by batch?

Thanks!

 

 

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
206 Views

what exactly does the batch mean here?  BATCH mode means if the input data size feet with RAM available on your system then BATCH mode is more preferable mode to run. You may see more info into DAAL User's Guide regard to batch, online or distributed computation modes

Reply