def __init__(self, feature_size, field_size, embedding_size=8, deep_layers=None, deep_init_size=50, dropout_deep=None, deep_layer_activation=tf.nn.relu, epoch=10, batch_size=256, learning_rate=0.001, optimizer='adam', batch_norm=0, batch_norm_decay=0.995, verbose=False, random_seed=2016, loss_type='logloss', eval_metric=roc_auc_score, greater_is_better=True, use_inner=True):
    assert (loss_type in ['logloss', 'mse']), "loss_type can be either 'logloss' for classification task or 'mse' for regression task"
    if (deep_layers is None):
        deep_layers = [32, 32]
    if (dropout_deep is None):
        dropout_deep = [0.5, 0.5, 0.5]
    self.feature_size = feature_size
    self.field_size = field_size
    self.embedding_size = embedding_size
    self.deep_layers = deep_layers
    self.deep_init_size = deep_init_size
    self.dropout_dep = dropout_deep
    self.deep_layers_activation = deep_layer_activation
    self.epoch = epoch
    self.batch_size = batch_size
    self.learning_rate = learning_rate
    self.optimizer_type = optimizer
    self.batch_norm = batch_norm
    self.batch_norm_decay = batch_norm_decay
    self.verbose = verbose
    self.random_seed = random_seed
    self.loss_type = loss_type
    self.greater_is_better = greater_is_better
    (self.train_result, self.valid_result) = ([], [])
    self.use_inner = use_inner
    self._init_graph()
def __init__(self, feature_size, field_size, embedding_size=8, deep_layers=None, deep_init_size=50, dropout_deep=None, deep_layer_activation=tf.nn.relu, epoch=10, batch_size=256, learning_rate=0.001, optimizer='adam', batch_norm=0, batch_norm_decay=0.995, verbose=False, random_seed=2016, loss_type='logloss', eval_metric=roc_auc_score, greater_is_better=True, use_inner=True):
    assert (loss_type in ['logloss', 'mse']), "loss_type can be either 'logloss' for classification task or 'mse' for regression task"
    if (deep_layers is None):
        deep_layers = [32, 32]
    if (dropout_deep is None):
        dropout_deep = [0.5, 0.5, 0.5]
    self.feature_size = feature_size
    self.field_size = field_size
    self.embedding_size = embedding_size
    self.deep_layers = deep_layers
    self.deep_init_size = deep_init_size
    self.dropout_dep = dropout_deep
    self.deep_layers_activation = deep_layer_activation
    self.epoch = epoch
    self.batch_size = batch_size
    self.learning_rate = learning_rate
    self.optimizer_type = optimizer
    self.batch_norm = batch_norm
    self.batch_norm_decay = batch_norm_decay
    self.verbose = verbose
    self.random_seed = random_seed
    self.loss_type = loss_type
    self.greater_is_better = greater_is_better
    (self.train_result, self.valid_result) = ([], [])
    self.use_inner = use_inner
    self._init_graph()