Module Neuron

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