package tiny_libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module NeuronSource

Sourcetype t = {
  1. weights : float array;
  2. bias : float;
}
Sourcetype example = float array * float
Sourceval make : inputs:int -> seed:int -> t
Sourceval sum : t -> float array -> float
Sourceval answer : t -> float array -> float
Sourceval learn : ?rate:float -> t -> example -> t
Sourceval epoch : ?rate:float -> t -> example list -> t
Sourceval train : ?epochs:int -> ?rate:float -> t -> example list -> t
Sourceval mistakes : t -> example list -> int
Sourceval learns : ?epochs:int -> ?seed:int -> example list -> float
Sourceval and_ : example list
Sourceval or_ : example list
Sourceval xor : example list