model.add(tf.layers.dense({inputShape: [numOfFeatures], activation: "relu", units: 5}));
model.add(tf.layers.dense({activation: "relu", units: 5}));
model.add(tf.layers.dense({activation: "sigmoid", units: 1}));
// Compile the model using the binaryCrossentropy loss,
// the rmsprop optimizer, and accuracy for your metrics.
model.compile({loss: "binaryCrossentropy",
optimizer: tf.train.rmsprop(.01),
metrics: 'accuracy'});
As done as an exercise in https://www.coursera.org/learn/browser-based-models-tensorflow/programming/uXxoO/week-1-breast-cancer-classification
Data from https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)
Very quick to train with very small model. E.g.