package neural_nets_lib

  1. Overview
  2. Docs
A from-scratch Deep Learning framework with an optimizing compiler, shape inference, concise syntax

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.6.0.4.tar.gz
md5=5beaaa0b377bec3badffffbf9f4dec4a
sha512=a37a67452746143f0f5ba2e81f98d6fed31fb4397e0a85f4a35aedc805b4e0405ea89d465c6f80941c465fb61d5d6119806cb73b5c5ead925797eb80d19c5ade

doc/neural_nets_lib.datasets/Datasets/Half_moons/index.html

Module Datasets.Half_moonsSource

Half moons synthetic dataset generation

Sourcemodule Config : sig ... end

Configuration for the half moons dataset

Sourceval generate_with_kind : (float, 'a) Stdlib__Bigarray.kind -> ?config:Config.t -> len:int -> unit -> (float, 'a, Bigarray.c_layout) Bigarray.Genarray.t * (float, 'a, Bigarray.c_layout) Bigarray.Genarray.t

Internal helper function to generate half moons with specified precision.

  • parameter kind

    The bigarray kind (float32 or float64)

  • parameter config

    Configuration for noise and randomization

  • parameter len

    Number of samples per moon (total samples = len * 2)

  • returns

    A tuple of (coordinates, labels) where:

    • coordinates is a bigarray of shape len*2; 2 (batch_axis, output_axis)
    • labels is a bigarray of shape len*2; 1 (batch_axis, output_axis)
    • First moon has label 1.0, second moon has label -1.0

Generate the half moons dataset with the specified parameters.

  • parameter config

    Configuration for noise and randomization

  • parameter len

    Number of samples per moon (total samples = len * 2)

  • returns

    A tuple of (coordinates, labels) where:

    • coordinates is a bigarray of shape len*2; 2 (batch_axis, output_axis)
    • labels is a bigarray of shape len*2; 1 (batch_axis, output_axis)
    • First moon has label 1.0, second moon has label -1.0
Sourceval generate_single_prec : ?config:Config.t -> len:int -> unit -> (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Genarray.t * (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Genarray.t

Generate the half moons dataset with single precision floats.

  • parameter config

    Configuration for noise and randomization

  • parameter len

    Number of samples per moon (total samples = len * 2)

  • returns

    A tuple of (coordinates, labels) where:

    • coordinates is a bigarray of shape len*2; 2 (batch_axis, output_axis) with float32 elements
    • labels is a bigarray of shape len*2; 1 (batch_axis, output_axis) with float32 elements
    • First moon has label 1.0, second moon has label -1.0
Sourceval generate_arrays : ?noise_range:float -> len:int -> unit -> float array * float array

Generate half moons dataset using the old array-based approach for compatibility. This function is deprecated and provided for backwards compatibility.

  • parameter len

    Number of samples per moon

  • parameter noise_range

    Range of noise to add

  • returns

    A tuple of (coordinates_array, labels_array) as flat arrays

OCaml

Innovation. Community. Security.