Skip to content

NodeJS (TypeScript) implementation of some very basic machine learning to predict gender by weight and height

Notifications You must be signed in to change notification settings

nicholasmordecai/basic-neural-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predict Gender From Height & Weight with Neural Network

NodeJS (TypeScript) implementation of some very basic machine learning with 2 inputs, 2 hiden neurons and one output neuron.

Get Running

This project has no dependencies, mathematical or machine learning. The only dependencies are for development: -- Dependencies

  • TypeScript
  • Nodemon

-- Types

  • @types/node

this will keep alive until any .ts file is changed, the re-compile and nodemon will restart the process.

$ npm install
$ npm run dev

How It Works

There are 2 inputs, two neurons in the hidden layer and 1 output neuron. Looks like this:

alt text

Starting our neurons, weights and biases with random normal distributions, we apply our training data for the network to refine it's ability to accuratly predict the outcome.

We take the weight and height of a person, and with the trained network, we can accuratly predict the gender of any person. Of course this isn't always true as there are many people who have the same weight and height as the other gender. This is simply based on statistics.

About

Just a fun little project I did to get an introduction to machine learning & neural networks.

Project is based from a Python implementation: - intro-to-neural-networks.

About

NodeJS (TypeScript) implementation of some very basic machine learning to predict gender by weight and height

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published