Пример #1
0
def runExperiment(args):
    """ Build a model and test it."""
    model, dataSet = setupExperiment(args)

    allRanks, avgRanks, avgStats = testModel(
        model, [d for d in dataSet if d[2] % 100 == 0], categorySize=6, verbosity=args.verbosity
    )
    printRankResults("JUnit5", avgRanks, avgStats)

    return model
Пример #2
0
def runExperiment(args):
    """ Build a model, test it, print and return results metrics."""
    model, dataSet = setupExperiment(args)

    allRanks, avgRanks, avgStats = testModel(model,
                                             dataSet,
                                             categorySize=CATEGORY_SIZE,
                                             verbosity=args.verbosity)
    printRankResults("JUnit1", avgRanks, avgStats)

    return allRanks, avgRanks, avgStats
Пример #3
0
def runExperiment(args):
  """ Build a model, test it, print and return results metrics."""
  model, dataSet = setupExperiment(args)

  allRanks, avgRanks, avgStats = testModel(model,
                           dataSet,
                           categorySize=CATEGORY_SIZE,
                           verbosity=args.verbosity)
  printRankResults("JUnit1", avgRanks, avgStats)

  return allRanks, avgRanks, avgStats
Пример #4
0
def runExperiment(args):
    """ Build a model and test it."""
    model, dataSet = setupExperiment(args)

    allRanks, avgRanks, avgStats = testModel(
        model, [d for d in dataSet if d[2] % 100 == 0],
        categorySize=6,
        verbosity=args.verbosity)
    printRankResults("JUnit5", avgRanks, avgStats)

    return model
Пример #5
0
def runExperiment(args, testIndex=0):
    """ Build a model and test it.
  @param testIndex (int) Specifies the doc of each group we use for inference.
  """
    model, dataSet = setupExperiment(args)

    allRanks, avgRanks, avgStats = testModel(
        model, [d for d in dataSet if d[2] % 100 == testIndex], categorySize=CATEGORY_SIZE, verbosity=args.verbosity
    )
    printRankResults("JUnit2", avgRanks, avgStats)

    return allRanks, avgRanks, avgStats
Пример #6
0
def runExperiment(args):
  """ Build a model and test it."""
  # TODO: args.verbosity deprecated b/c PrettyTable formatting can't handle
  # large text items.
  args.verbosity = 0

  model, dataSet = setupExperiment(args)

  allRanks, avgRanks, avgStats = testModel(model,
                    [d for d in dataSet if d[2]%100==0],
                    categorySize=CATEGORY_SIZE,
                    verbosity=args.verbosity)
  printRankResults("JUnit4", avgRanks, avgStats)

  return allRanks, avgRanks, avgStats
Пример #7
0
def runExperiment(args, testIndex=0):
  """ Build a model and test it.
  @param testIndex (int) Specifies the doc of each group we use for inference.
  """
  model, dataSet = setupExperiment(args)

  allRanks, avgRanks, avgStats = testModel(
    model,
    [d for d in dataSet if d[2]%100==testIndex],
    categorySize=CATEGORY_SIZE,
    verbosity=args.verbosity
  )
  printRankResults("JUnit2", avgRanks, avgStats)

  return allRanks, avgRanks, avgStats
Пример #8
0
def runExperiment(args):
    """ Build a model and test it."""

    # Filtering text helps word level and union pooler models for test 4.
    # It does not help keywords or document fingerprint models.
    if args.modelName == "htm":
        args.filterText = True

    model, dataSet = setupExperiment(args)

    allRanks, avgRanks, avgStats = testModel(
        model, [d for d in dataSet if d[2] % 100 == 0],
        categorySize=CATEGORY_SIZE,
        verbosity=args.verbosity)
    printRankResults("JUnit4", avgRanks, avgStats)

    return allRanks, avgRanks, avgStats
def runExperiment(args):
  """ Build a model and test it."""

  # Filtering text helps word level and union pooler models for test 4.
  # It does not help keywords or document fingerprint models.
  if args.modelName == "htm":
    args.filterText = True

  model, dataSet = setupExperiment(args)

  allRanks, avgRanks, avgStats = testModel(
    model,
    [d for d in dataSet if d[2]%100==0],
    categorySize=CATEGORY_SIZE,
    verbosity=args.verbosity
  )
  printRankResults("JUnit4", avgRanks, avgStats)

  return allRanks, avgRanks, avgStats
Пример #10
0
def runExperiment(args):
  """ Build a model and test it."""
  model, dataSet = setupExperiment(args)

  if args.testB:
    allRanks, avgRanks, avgStats = testModel(model,
                                           [d for d in dataSet if d[2]%100==0],
                                           categorySize=CATEGORY_SIZE,
                                           verbosity=args.verbosity)
    printRankResults("JUnit3B", avgRanks, avgStats)

  else:
    allRanks, avgRanks, avgStats = testModel(model,
                                           dataSet,
                                           categorySize=CATEGORY_SIZE,
                                           verbosity=args.verbosity)
    printRankResults("JUnit3", avgRanks, avgStats)

  return allRanks, avgRanks, avgStats