<commit_before>package ciir.jfoley.chai.classifier;

import ciir.jfoley.chai.collections.Pair;

import java.io.Serializable;
import java.util.*;

/**
 * @author jfoley
 */
public class Perceptron extends Classifier implements Serializable {
  private final int maxIterations;
  public transient Random random = new Random();
  private static final long serialVersionUID = 0x71f941717ddd39b1L;

  final int ND;
  float w[];

  public Perceptron(int nd, int maxIterations) {
    this.maxIterations = maxIterations;
    ND = nd;<commit_msg>Oops, don't override random<commit_after>package ciir.jfoley.chai.classifier;

import ciir.jfoley.chai.collections.Pair;

import java.io.Serializable;
import java.util.*;

/**
 * Slight misnomer, actually an Averaged-Perceptron.
 * @author jfoley
 */
public class Perceptron extends Classifier implements Serializable {
  private final int maxIterations;
  private static final long serialVersionUID = 0x71f941717ddd39b1L;

  final int ND;
  float w[];

  public Perceptron(int nd, int maxIterations) {
    this.maxIterations = maxIterations;
    ND = nd;
{'fraction_non_alphanumeric': 0.08791208791208792, 'fraction_numerical': 0.02197802197802198, 'mean_word_length': 4.576530612244898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3018582', 'n_tokens_mistral': 380, 'n_tokens_neox': 353, 'n_words': 95}