<commit_before>package main

import (
	"fmt"
	"math/rand"
)

func main() {
	rand.Seed(1337)

	n := CreateNetwork(2, 4, 1)

	fmt.Println(0.0, 0.0, "-", n.Calculate([]float64{0.0, 0.0}))
	fmt.Println(1.0, 0.0, "-", n.Calculate([]float64{1.0, 0.0}))
	fmt.Println(0.0, 1.0, "-", n.Calculate([]float64{0.0, 1.0}))
	fmt.Println(1.0, 1.0, "-", n.Calculate([]float64{1.0, 1.0}))

	repeat(func() {
		n.Train([]float64{0.0, 0.0}, []float64{1.0})
		n.Train([]float64{1.0, 0.0}, []float64{0.0})
		n.Train([]float64{0.0, 1.0}, []float64{0.0})
		n.Train([]float64{1.0, 1.0}, []float64{1.0})
	}, 10000)

	fmt.Println(0.0, 0.0, "-", n.Calculate([]float64{0.0, 0.0}))
	fmt.Println(1.0, 0.0, "-", n.Calculate([]float64{1.0, 0.0}))
	fmt.Println(0.0, 1.0, "-", n.Calculate([]float64{0.0, 1.0}))
	fmt.Println(1.0, 1.0, "-", n.Calculate([]float64{1.0, 1.0}))
}
<commit_msg>- Small ReWrite of Training algoritm<commit_after>package main

import (
	"fmt"
	"math/rand"
)

func main() {
	rand.Seed(1338)

	n := CreateNetwork(2, 2, 1)
	fmt.Println("Before training")
	fmt.Println(0.0, 0.0, "-", n.Calculate([]float64{0.0, 0.0}))
	fmt.Println(1.0, 0.0, "-", n.Calculate([]float64{1.0, 0.0}))
	fmt.Println(0.0, 1.0, "-", n.Calculate([]float64{0.0, 1.0}))
	fmt.Println(1.0, 1.0, "-", n.Calculate([]float64{1.0, 1.0}))

	repeat(func() {
		n.Train([]float64{0.0, 0.0}, []float64{1.0})
		n.Train([]float64{1.0, 0.0}, []float64{0.0})
		n.Train([]float64{0.0, 1.0}, []float64{0.0})
		n.Train([]float64{1.0, 1.0}, []float64{1.0})
	}, 10000)

	fmt.Println("After training")
	fmt.Println(0.0, 0.0, "-", n.Calculate([]float64{0.0, 0.0}))
	fmt.Println(1.0, 0.0, "-", n.Calculate([]float64{1.0, 0.0}))
	fmt.Println(0.0, 1.0, "-", n.Calculate([]float64{0.0, 1.0}))
	fmt.Println(1.0, 1.0, "-", n.Calculate([]float64{1.0, 1.0}))
}

{'fraction_non_alphanumeric': 0.29938444320089536, 'fraction_numerical': 0.14773363178511473, 'mean_word_length': 3.912087912087912, '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': '6040227', 'n_tokens_mistral': 1015, 'n_tokens_neox': 884, 'n_words': 125}