0.0.1 • Published 5 years ago

neuraljs v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

NeuralJS

A very simple collection of Machine Learning algorithms.

To install node package

 npm install neuraljs@latest

The library contains many algorithms (and more to come soon)

  • Genetic Algorithms

    to setup, create a class implementing DNA. Then, in your main file:
import {GeneticAlgorithm} from "neuraljs";
const {MUTATION_DECAY, Population} = GeneticAlgorithm;

class Chromosome implements DNA<number> {...}

const dna_size = 10;
const population = new Population(200, 0.3, MUTATION_DECAY);

population.createIndividual = () => {
  return new Chromosome(dna_size);
};

population.initPopulation();
for (let i = 0; i < 5000; i++) {
  population.evolve();
//   console.log(population.details()); Un commonet for output

}
0.0.1

5 years ago