import os

## The cuurent hyper-parameters values are not necessarily the best ones for a specific risk.
def get_hparams_class(dataset_name):
    """Return the algorithm class with the given name."""
    if dataset_name not in globals():
        raise NotImplementedError("Dataset not found: {}".format(dataset_name))
    return globals()[dataset_name]


class AMAZON_REVIEWS():
    def __init__(self):
        super(AMAZON_REVIEWS, self).__init__()
        # self.clf_params = {
        #     'Linear_Classifier': {'l1_ratio': [ 0.3, 0.5],
        #                'lambda': [0.001, 1]}}
        self.clf_params_to_search = {
            'Linear_Classifier':
              {'l1_ratio': [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
                'lambda': [0.0001, 0.001, 0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 1, 1.5, 2, 5]},
            'GDBT_Classifier':
                {
                'lambda_l1': [0, 0.25, 0.5, 0.75, 1.0],
                'lambda_l2': [0, 0.0001, 0.001, 0.01, 0.1, 0.5, 1, 2, 4],
                'num_leaves': [64, 248, 1024, 2048, 4096],
                'learning_rate': [0.01, 0.001],
                'feature_fraction': [0.4, 0.8, 1.0],
                'bagging_fraction':  [1.0]}}
