示例#1
0
  public void generateUsers(String filename, int nextUserId, List<UserType> userTypes) {

    dataGenerator.setNextUserId(nextUserId);
    System.out.println("Generating users...");
    List<User> allUsers = dataGenerator.generateUsers(userTypes);
    System.out.println("Saving users into '" + filename + "'");
    DataUtils.saveUsers(filename, allUsers);
  }
示例#2
0
  public void create() {

    System.out.println("Creating data for the credit worthiness (score) use case:");
    System.out.println("   Number of users in the training set: " + nTrainingUsers);
    System.out.println("    Number of users in the testing set: " + nTestUsers);
    System.out.println("___________________________________________________________");

    List<UserType> trainingUserTypes = createUserTypes(nTrainingUsers);
    int userIdSequenceStart = 1;
    generateUsers(TRAINING_USERS_FILENAME, userIdSequenceStart, trainingUserTypes);

    dataGenerator.setNoiseOn(true);

    List<UserType> testUserTypes = createUserTypes(nTestUsers);
    userIdSequenceStart = 500000;
    // generateUsers(TEST_USERS_FILENAME, 2*nTrainingUsers, testUserTypes);
    generateUsers(TEST_USERS_FILENAME, userIdSequenceStart, testUserTypes);

    System.out.println("Done!");
  }