ShortcutML
Machine learning library for shortcuts.
Description
Features:
- Image Classifier
- Multi-Layer Perceptron
- Hopfield Network
Planned:
- Discreet Sequence Recall
- Genetic Algorithm
- KNN
- etc
Image Classifier
No training required but does require a manual tap interaction step to use.
Example Use
Classification
Classification is done by passing a dictionary containing a base64 encoded PNG Image.
{
"Architecture": "Image Classifier",
"Image": "iVBORw0K..."
}
Multi-Layer Perceptron
Training
Training the Perceptron is done by passing a dictionary describing the inputs, hidden layer, and outputs.
Training data is a \n separated list of the form [inputs,...]=>[output]
{
"Name": "XOR",
"Architecture": "Perceptron",
"Inputs": 2,
"Hidden": [2],
"Outputs": 1,
"Training Data": "[0,1]=>[1]\n[1,0]=>[1]\n[1,1]=>[0]\n[0,0]=>[0]",
"Error": 0.0001,
"Iterations": 50000
}
Inference
Inference is done by passing a dictionary with Inputs provided as [inputs,...]
{
"Name":"XOR",
"Architecture":"Perceptron",
"Inputs":"[0,0]"
}
Hopfield Network
Training
Training the Hopfield network is done by passing a dictionary describing the inputs binary sequences and bit-length of the network.
{
"Name":"10-Bit Example",
"Architecture":"Hopfield",
"Bit Length":10,
"Training Data":[
"[0, 1, 0, 1, 0, 1, 0, 1, 0, 1]",
"[1, 1, 1, 1, 1, 0, 0, 0, 0, 0]"
]}
Feeding
Feeding the hopfield is done by passing a dictionary with Inputs provided as [input,...]
{
"Name":"10-Bit Example",
"Architecture":"Hopfield",
"Inputs":"[0,1,0,1,0,1,0,1,1,1]"
}
Dependency Badge
[![This shortcut depends on ShortcutML](http://magaimg.net/img/8kdh.png)](https://routinehub.co/shortcut/3246)
Credits
Perceptron & Hopfield Based on Synaptic
Image Classifier Based on ml5.js
Supports |
|
---|---|
Latest Release Notes
1.0.11 - July 27, 2019, 9:01 a.m.
Adding image Classifier to library.
Past versions