import math


def get_auto_embedding_dim(num_classes):
    """ Calculate the dim of embedding vector according to number of classes in the category
    emb_dim = [6 * (num_classes)^(1/4)]

    ref: Ruoxi Wang, Bin Fu, Gang Fu, and Mingliang Wang. 2017. Deep & Cross Network for Ad Click Predictions.
    In Proceedings of the ADKDD’17 (ADKDD’17). Association for Computing Machinery, New York, NY, USA, Article 12, 1–7.
    DOI:https://doi.org/10.1145/3124749.3124754


    :param num_classes: number of classes in the category
    :return: the dim of embedding vector
    """
    return math.floor(6 * math.pow(num_classes, 0.26))