philsupertramp / game-math

C++ library implementing game related math
https://philsupertramp.github.io/game-math/
MIT License
0 stars 0 forks source link

Extend current NN to allow numeric classification/prediction #17

Open philsupertramp opened 3 years ago

philsupertramp commented 3 years ago

Binary prediction is cool and fun to play with. One can implement a NN to manage business logic, classify objects in images or simply help finding a decision. Another use case for NNs are numeric predictions, which we want to add to the library. To achieve that, one needs to

  1. add normalization to the datasets, easy!
    normalizedX = (x-min(x))/(max(x)-min(x))
  2. replace sigmoid with identity for activation
    x = x

    and obviously it's derivative

    x' = 1
  3. Implement Predict(input) method for NN

at the end implement a test, use sin() or cos() to generate datasets and for testing

philsupertramp commented 3 years ago

take a look at https://towardsdatascience.com/machine-learning-basics-with-the-k-nearest-neighbors-algorithm-6a6e71d01761