ecraft2learn / ai

AI extensions of Snap! created by the eCraft2Learn project
https://ecraft2learn.github.io/ai/
Other
26 stars 12 forks source link

Create a sample project or exercise diagnosing breast cancer #99

Open ToonTalk opened 4 years ago

ToonTalk commented 4 years ago

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.

        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'});
ToonTalk commented 4 years ago

Perhaps worth adding a block that reads in a CSV and the name(s) of the output columns and produces the xs and ys lists.