<commit_before>require "neural/version"
require 'perceptron'
require 'trainer'

module Neural
  class Driver

    def f x
      0.4 * x + 1
    end

    def setup
      ptron = Perceptron.new 3

      2000.times do |n|
        x = rand -400..400
        y = rand -400..400

        answer = if y < f(x)
                   -1
                 else
                   1
                 end

        t = Trainer.new inputs: [x, y], answer: answer
        ptron.train t.inputs, t.answer
      end

      puts ptron.weights[0] / ptron.weights[1]
      puts ptron
    end
  end
end<commit_msg>Remove unused<commit_after>require "neural/version"
require 'perceptron'
require 'trainer'

module Neural
  class Driver

    def f x
      0.4 * x + 1
    end

    def setup
      ptron = Perceptron.new 3

      2000.times do
        x = rand -400..400
        y = rand -400..400

        answer = if y < f(x)
                   -1
                 else
                   1
                 end

        t = Trainer.new inputs: [x, y], answer: answer
        ptron.train t.inputs, t.answer
      end

      puts ptron.weights[0] / ptron.weights[1]
      puts ptron
    end
  end
end
{'fraction_non_alphanumeric': 0.08361774744027303, 'fraction_numerical': 0.040955631399317405, 'mean_word_length': 1.260115606936416, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1247236', 'n_tokens_mistral': 415, 'n_tokens_neox': 370, 'n_words': 115}