Skip to content

Instantly share code, notes, and snippets.

@baselbb
baselbb / keras_debt.py
Last active October 21, 2017 12:03
Keras Neural Network to Accelerate Debt and Invoice Late Payment
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Dense
import numpy as np
# Input
predictors = np.array([[1, 0, 0],
[1, 1, 0],
[1, 1, 1],
[0, 1, 1],
@baselbb
baselbb / keras_xor.py
Last active October 21, 2017 22:52
Keras XOR Neural Network
# Import keras modules
from keras.models import Sequential
from keras.layers import Dense
# Import numpy to define our arrays
import numpy as np
# Inputs: This is out input numpy array, consisting or three column inputs and
# 7 rows of training data
predictors = np.array([[0, 0, 1],