This a Web Devs meet up so we will talk about mostly the web aspects
They need decisions.
This can be hard.
"Given a decision where the logic is unknown to us, but we have observations about the decision process, it is possible to use statistical analyses of these observations to create an approximation of the decision logic." - Ryan Case
Loss is a number indicating how bad the model's prediction was on a single example. If the model's prediction is perfect, the loss is zero; otherwise, the loss is greater.
Pandas, Numpy, CAFFE, PyTorch, Apache Spark, matplotlib, Scikit-Learn, Seaborn
Microsoft CNTK, Amazon SageMaker,
Google Cloud ML Engine
{"text":"Action Adventure Sci-Fi Bryan Singer Patrick Stewart Hugh Jackman Ian McKellen Famke Janssen","category":"150"}
157 million gross
const brain = require('brain.js');
const data = require('./movies.json');
const network = new brain.recurrent.LSTM();
const trainingData = data.map(item => ({
input: item.text,
output: item.category
}));
network.train(trainingData, {
iterations: 100
});
// test this string
let movie = 'Action Bryan Singer Hugh Jackman');
const output = network.run(movie);
console.log('Category:' + output);X2: X-Men United (2003)
$110 Million
I am not good at this yet 😔
Data matters MOST 💾
Verification takes thought ✅
Debugging can be hard 🐛
I needed more practice 💃
Playing with data is really FUN I should try more 🤠
Get out your phones, be on wifi
Got to this URL:
😎 ALL in the browser
😎 ml5.js runs tenserflow.js
😎 works with pd.js for dom fun
JS loading takes time ⏱️
Model has to be small 🤏
Normal Browser JS limitations 😤
<!-- p5 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<!-- ml5 -->
<script src="https://unpkg.com/ml5@0.4.3/dist/ml5.min.js"></script>function setup(){
createCanvas(windowWidth, 800);
options = {
video: camChoice
};
video = createCapture(options);
background(0);
video.hide();
mobileNet = ml5.imageClassifier('MobileNet', video, modelReady)
}function modelReady(){
report('#ready', 'Model Ready');
mobileNet.predict(gotResults);
}function gotResults(error, results){
if(error){
console.log(error);
}
else{
resultLabel = results[0].label;
setTimeout(() => {
mobileNet.predict(gotResults);
resultLabel = '';
report('#matching', 'Matching');
}, 1000);
}
}Image recognition for everyone 😎
Very simple to use 😀
ALL IN BROWSER 💖
Limited by by phone capabilities 📱
Not learning lots of ML ⚙️ 📖
Bugs are haaard 🐛 🐞 🐜
Images fool humans often too. This is a sink.
Predict the next piece of content (article, product, video) a user is likely to want to view and adjust or filter the user experience to account for this
Mostly because of the browsers not the ML
All the capture and training right here
// inside function setup()
const featureExtractor = ml5.featureExtractor('MobileNet', modelReady);
const classifier = featureExtractor.classification(video, videoReady);classifier.addImage('myImageLabel');classifier.train(function(lossValue) {
if (lossValue) {
loss = lossValue;
// show loss
select('#loss').html('Loss: ' + loss);
} else {
// show when finished
select('#loss').html('Done Training! Final Loss: ' + loss);
}First to tell me the 3 objects gets an IDX hat!
ok, well this was supposed to be under 1h.. so meet again at the python meetup??
slides, links, etc.. on Eugene Web Devs github