An open API service indexing awesome lists of open source software.

https://github.com/tsoding/nnaskell

Neural Network in Haskell
https://github.com/tsoding/nnaskell

functional-programming hacktoberfest hacktoberfest2020 haskell machine-learning neural-network

Last synced: about 1 month ago
JSON representation

Neural Network in Haskell

Awesome Lists containing this project

README

          

[![Tsoding](https://img.shields.io/badge/twitch.tv-tsoding-purple?logo=twitch&style=for-the-badge)](https://www.twitch.tv/tsoding)
[![Build Status](https://travis-ci.org/tsoding/nnaskell.svg?branch=master)](https://travis-ci.org/tsoding/nnaskell)

# Nnaskell

Neural Network in Haskell

## Quick Start

```console
$ nix-shell # only for NixOS
$ stack build
$ stack ghci
> nn <- randomNN [2, 2, 1]
> xorTD
[([0.0,0.0],[0.0]),
([1.0,0.0],[1.0]),
([0.0,1.0],[1.0]),
([1.0,1.0],[0.0])]
> let trainedNN = head $ drop 1000 $ optimizeCost (cost xorTD) nn
> activateNN trainedNN $ vector [0.0, 0.0]
[4.045689665702377e-3]
> activateNN trainedNN $ vector [1.0, 0.0]
[0.9970477904605844]
>
```

## Support

You can support my work via

- Twitch channel: https://www.twitch.tv/subs/tsoding
- Patreon: https://www.patreon.com/tsoding