Пример #1
0
def svm_epoch(model_table, dat_table, label, arr, epoch, step=0.1, mu=0.1):
    ''' Creates a query to update the SVM model
  '''
    return iutil.bismarck_epoch(
        model_table, dat_table, 'svm(__PREV_MODEL__, %(arr)s, '
        '%(label)s, %(step)s, %(mu)s)' % {
            'arr': arr,
            'label': label,
            'step': step,
            'mu': mu
        }, epoch, label)
Пример #2
0
def logr_epoch(model_table, dat_table, label, arr, epoch, step=0.1, mu=0.1):
  ''' Generates a query to train the model
  This will create a query to insert into the state table.
  @param model_table: name of table to store models
  @param dat_table: name of table we iterate over
  @param label: name of label column
  @param arr: UDF that returns an double array stored as a string
  @param epoch: the epoch number (first epoch is 1, the 0th epoch is an empty string)
  '''
  return iutil.bismarck_epoch(model_table, dat_table, 'logr(__PREV_MODEL__, %(arr)s, '
      '%(label)s, %(step)s, %(mu)s)' % {'arr':arr, 'label':label, 'step':step,
        'mu':mu}, epoch, label)
Пример #3
0
def logr_epoch(model_table, dat_table, label, arr, epoch, step=0.1, mu=0.1):
  ''' Generates a query to train the model
  This will create a query to insert into the state table.
  @param model_table: name of table to store models
  @param dat_table: name of table we iterate over
  @param label: name of label column
  @param arr: UDF that returns an double array stored as a string
  @param epoch: the epoch number (first epoch is 1, the 0th epoch is an empty string)
  '''
  return iutil.bismarck_epoch(model_table, dat_table, 'logr(__PREV_MODEL__, %(arr)s, '
      '%(label)s, %(step)s, %(mu)s)' % {'arr':arr, 'label':label, 'step':step,
        'mu':mu}, epoch, label)
Пример #4
0
def svm_epoch(model_table, dat_table, label, arr, epoch, step=0.1, mu=0.1):
  ''' Creates a query to update the SVM model
  '''
  return iutil.bismarck_epoch(model_table, dat_table, 'svm(__PREV_MODEL__, %(arr)s, '
      '%(label)s, %(step)s, %(mu)s)' % {'arr':arr, 'label':label, 'step':step,
        'mu':mu}, epoch, label)