<commit_before>import assert from 'assert';
import { brain } from '../../src';

const trainingData = [
  // xor data, repeating to simulate that we have a lot of data
  { input: [0, 1], output: [1] },
  { input: [0, 0], output: [0] },
  { input: [1, 1], output: [0] },
  { input: [1, 0], output: [1] },

  // repeat xor data to have enough to train with
  { input: [0, 1], output: [1] },
  { input: [0, 0], output: [0] },
  { input: [1, 1], output: [0] },
  { input: [1, 0], output: [1] },
];

// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const netOptions = {
  hiddenLayers: [3],
};

// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const trainingOptions = {
  iterations: 20000,
  log: (details: string) => console.log(details),<commit_msg>fix example<commit_after>import assert from 'assert';
import { brain } from '../../src';

const trainingData = [
  // xor data, repeating to simulate that we have a lot of data
  { input: [0, 1], output: [1] },
  { input: [0, 0], output: [0] },
  { input: [1, 1], output: [0] },
  { input: [1, 0], output: [1] },

  // repeat xor data to have enough to train with
  { input: [0, 1], output: [1] },
  { input: [0, 0], output: [0] },
  { input: [1, 1], output: [0] },
  { input: [1, 0], output: [1] },
];

// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const netOptions = {
  hiddenLayers: [3],
};

// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const trainingOptions = {
  iterations: 20000,
  log: (details: any) => console.log(details),
{'fraction_non_alphanumeric': 0.19659735349716445, 'fraction_numerical': 0.03780718336483932, 'mean_word_length': 3.4858757062146895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6067792', 'n_tokens_mistral': 608, 'n_tokens_neox': 573, 'n_words': 174}