<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thomas Olivier on Medium]]></title>
        <description><![CDATA[Stories by Thomas Olivier on Medium]]></description>
        <link>https://medium.com/@TomOlivier?source=rss-4a4e4b56ac5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RCC8amYK54QXeRGHa5Lp7g.jpeg</url>
            <title>Stories by Thomas Olivier on Medium</title>
            <link>https://medium.com/@TomOlivier?source=rss-4a4e4b56ac5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:27:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@TomOlivier/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[10 steps to bootstrap your machine learning project (part 2)]]></title>
            <link>https://medium.com/metaflow-ai/10-steps-to-bootstrap-your-machine-learning-project-part-2-b6be78444c70?source=rss-4a4e4b56ac5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6be78444c70</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Thomas Olivier]]></dc:creator>
            <pubDate>Wed, 02 Nov 2016 13:59:36 GMT</pubDate>
            <atom:updated>2016-11-02T13:59:36.963Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJnXE8jVje21eXE2LNt7LQ.jpeg" /></figure><p>In the <a href="https://blog.metaflow.fr/10-steps-to-bootstrap-your-machine-learning-project-part-1-aa7e1031f5b1#.tiv7dwm4o">first article of this series</a>, we defined what the best steps are when working on a new machine learning project.</p><p>As a reminder, the <strong>first five steps</strong> are:</p><ol><li>Define your task</li><li>Define your dataset</li><li>Split your dataset</li><li>Define your metrics</li><li>Establish a baseline</li></ol><p>Your baseline is your lower boundary: you want to get better results than this dumb model. You are now looking to another boundary: <strong>the human error rate </strong>which is the accuracy someone familiar with your task can get easily. You want to <strong>reach this human error rate and go beyond it,</strong> if possible.</p><p><strong>6. Know some absolute metrics about neural nets 📊</strong></p><p>Before implementing your neural network, it could be interesting to know some <strong>absolute metrics on the computation of your neural network</strong>.</p><p>As stated by <a href="https://medium.com/u/98adb4b86b01">Yoshua Bengio</a> at the Bay Area Deep Learning School (<a href="https://www.youtube.com/watch?v=9dXiAecyJrY">video here</a>), if you have a network with <strong>N features</strong> and each one need <strong>O(K)</strong> (an order of K) <strong>parameters in the final model</strong>, you’ll, at least, need <strong>O(K*N)</strong> examples for your network to be able to generalize well. That’s an interesting metric as it gives you a first idea of the size of the needed dataset.</p><p>A bit more technical metric you can look at is the <strong>Vapnik–Chervonenkis dimension </strong>(<a href="https://en.wikipedia.org/wiki/VC_dimension">VC dimension</a>), which gives you the complexity of a neural network . It gives you a tool to measure the learning ability of the network. Although it’s not a mandatory step and it’s more used as a theoretical metric, it gives you a sense of what’s happening in terms of learning.</p><p><strong>7. Implement an existing neural network model ⚙</strong></p><p>You know the kind of neural network you are willing to implement. That is awesome. Don’t rush into developing it from scratch. You will probably be able to download it, already trained. This will make you earn tons of hours (both in engineering and in GPU-time). As <a href="https://medium.com/u/ac9d9a35533e">Andrej Karpathy</a> says: “<strong>Don’t be a hero</strong>” 😎.</p><p>Set it up with your favorite machine learning framework and run it!</p><p>You will also want to fine-tune your model so that it works well with your data. Fine-tuning a model implies playing with hyper-parameters, the size of the network, the processing of your data…</p><p>Compute the error on the train and dev datasets, fine-tune it to your specific task and analyse the output errors.</p><p><strong>Try to be always close to your data:</strong></p><ul><li>Visualize your inputs / outputs (you could plot your data and their computed categories for example)</li><li>Collect summary statistics</li><li>Play with your hyper parameters and see how they affect your results (on a same graph, plot your error rates computed with different hyper parameters)</li></ul><p><strong>8. Other architectures?</strong></p><p>If you had some doubts when choosing your model, it’s great to <strong>give a try to other architectures</strong> and compare their results.</p><p>For example, if you plan to translate from a language to another one, you could have a look at the <a href="https://arxiv.org/abs/1409.3215">Seq2Seq</a> model, but also to some simpler RNN architectures.</p><p>If you are working with words, you could try using different embedding.</p><p>For a <strong>full list of classic networks</strong>, <em>The Asimov Institute</em> came up with an awesome blog post: <a href="http://www.asimovinstitute.org/neural-network-zoo/">The Neural Network Zoo</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gccuMDV8fXjcvz1RSk4kgQ.png" /><figcaption>The Neural Network Zoo</figcaption></figure><p>I you do not find anything accessible, you can gain intuition by reading papers related to your problem. It will help you get insights on how a specific task is solved and thus could lead you to try new models.</p><p><strong>9. It’s not working, what should I do next? 🤔</strong></p><p>To get some understanding on what you should do next, you should first compare the human error level to your model error level, both on the training and the dev sets.</p><p>Plot the different error lines on a chart.</p><p>In order to know what kind of action we can take, we have to know if we are currently in a <strong>high bias or/and a high variance problem</strong>.</p><p>Remember that we split our dataset into three groups: the training set, the dev (or cross validation) set and the test set.</p><p>It’s important <strong>not to take the following actions at the same time</strong> as one action could solve all your problems. Do the first one, look at the results and see if you are still facing the same issue. If so, try another solution!</p><p>If your <strong>train error is high</strong>, compared to the <strong>human level error </strong>— high bias:</p><ul><li>Try to have a bigger (deeper) model</li><li>Add polynomial features / change your hyper-parameters</li><li>Train longer your model</li><li>New model architecture</li></ul><p>If your <strong>dev error is high</strong>, compared to your <strong>train error</strong> — high variance:</p><ul><li>More data</li><li>You could generate more data (add some noise, transpose,…)</li><li>Smaller set of features</li><li>Try regularization</li><li>Early stopping</li><li>New model architecture</li></ul><p>If your <strong>test error is high</strong> but your <strong>dev error is normal — </strong>overfit of your dev set<strong>:</strong></p><ul><li>Get more dev data by adding more data to your dataset or by changing the split of your dataset</li></ul><p>At some point, your machine learning algorithm can be better than the human level error but you can still experience some variance problems.</p><p>What you should know is that once you have reached the human lever error, it is harder and harder to get your algorithm better — and reach <strong>the </strong><a href="https://en.wikipedia.org/wiki/Bayes_error_rate"><strong>Bayes rate</strong></a> which is the the <strong>lowest possible error rate</strong> for any classifier of a random outcome.</p><p><strong>10. To sum it up 🏁</strong></p><p>Your goal is now to <strong>iterate over different models</strong> quickly to beat the baseline and <strong>reach your goal metrics</strong>.</p><p>It’s also important to <strong>gain intuition on how neural networks work</strong> to avoid doing unnecessary tasks and not to repeat the same mistakes over and over.</p><p>If you have any thoughts or want to share your own methodology, please do so in the comments! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6be78444c70" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metaflow-ai/10-steps-to-bootstrap-your-machine-learning-project-part-2-b6be78444c70">10 steps to bootstrap your machine learning project (part 2)</a> was originally published in <a href="https://medium.com/metaflow-ai">metaflow-ai</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 steps to bootstrap your machine learning project (part 1)]]></title>
            <link>https://medium.com/metaflow-ai/10-steps-to-bootstrap-your-machine-learning-project-part-1-aa7e1031f5b1?source=rss-4a4e4b56ac5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa7e1031f5b1</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[product-development]]></category>
            <dc:creator><![CDATA[Thomas Olivier]]></dc:creator>
            <pubDate>Wed, 19 Oct 2016 15:26:17 GMT</pubDate>
            <atom:updated>2016-11-02T14:18:58.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIqzygIhOnxjtlJZhNzSuA.jpeg" /></figure><p>Working on a new machine learning project is always exciting, indeed. As a technical person, your first move would probably be to open your favorite code editor and start <strong>the magical stuff</strong>. Do not go that fast ✋.</p><p>At <a href="http://metaflow.fr/">MetaFlow</a>, we found that in order to gain intuition and be able to work faster and faster on AI projects, <strong>following some methodology helps</strong>. Here is ours!</p><ol><li><strong>Define your task 🏁</strong></li></ol><p><strong>You should define what is the goal of your project, what are its inputs and outputs and what kinds of constraints does it have?</strong></p><p>Let’s take an example. Suppose <strong>the goal of your project</strong> is to be able to predict what someone will order for dessert in a restaurant, based on what he already ate.</p><p>If we already have a list of our meals as a list of classes, the input of your task would be what the client already ate (several classes’ ids), its output, what he’s most likely to order (a class id). About constraints? It should run on tablets waiters already have (memory efficiency) and give an answer in less than a second (speed efficiency).</p><p><strong>2. Define the dataset</strong></p><p>How will you feed your neural network? To do so, you can search for public datasets, licensed ones or have/build your own.</p><p><strong><em>Getting an existing dataset</em></strong></p><p>There are plenty of public datasets, here are a few examples:</p><ul><li><a href="https://research.google.com/youtube8m/">YouTube 8M videos</a>: 8 million labeled YouTube videos</li><li><a href="https://research.facebook.com/research/babi/">Facebook’s bAbI</a>: Q&amp;A dataset</li><li><a href="http://metamind.io/research/the-wikitext-long-term-dependency-language-modeling-dataset/">Wikitext</a>: more than 100 million tokens extracted from Wikipedia</li><li><a href="https://www.data.gov/">Data.gov</a>: U.S. Government’s open data (more than 190k datasets!)</li></ul><p>You can also find licensed datasets like <a href="https://www.bloomberg.com/enterprise/content-data/reference-data">Bloomberg</a>’s or <a href="https://data.crunchbase.com/">Crunchbase</a>’s ones.</p><p><strong><em>Your own dataset</em></strong></p><p>In some cases, you’ll want some data that exists on the internet but where no official dataset exists. This is where you’ll have to create a proper <strong>web crawler</strong>. Many libraries exist to create a web crawler in no time. At MetaFlow, we’re big fans of <a href="http://casperjs.org/">Casper.js</a> but use the one you like the most.</p><p><em>Example</em>: let’s say your project is to create a chatbot capable of talking like Eminem would. One dataset you would need is a compilation of all its songs’ lyrics. There is no such public dataset. Thankfully, you’ll find pretty easily his lyrics on <a href="http://genius.com/artists/Drake">Genius</a> and thus, create a crawler that will create your dataset.</p><p>Another way of having your dataset is by <strong>saving your own data</strong>. If your goal is to <strong>automate an existing product</strong>, you probably already have those. Otherwise, you could create a first app, powered by humans (or workers from <a href="https://www.mturk.com/mturk/welcome">mechanical turk</a>) which goal is to collect the data you need.</p><p><em>Let’s get back to our initial example</em>: predicting what the client will order for dessert. The dataset we need here is the history of what the restaurant’s clients ever ordered. We probably already have that data somewhere. A simple formatting of them could be enough.</p><p>At this point, you <strong>should not spend too much time checking the size of your data</strong>. This is something we’ll check with our first results.</p><p>Something interesting to do with your dataset is <strong>data-visualization</strong>: t-SNE / trees if you are working with words, histograms showing the distribution of your data if you are working with classes. To know more about t-SNE, read this <a href="http://distill.pub/2016/misread-tsne/">excellent article</a> from Distill.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*T4zdPqTKBiLIlho4e8ywRw.jpeg" /><figcaption>t-SNE + K-means visualization</figcaption></figure><p><strong>3. Split your dataset ✂️</strong></p><p>Ok, this one is easy. Just split your dataset into three groups: the training set, the dev (or cross validation) set and the test set. A classic split is 70%, 15% and 15% of your whole dataset.</p><p>One point that might be tricky is <strong>the distribution of your dataset</strong> before splitting it. It is indeed important for your training set, dev set and test set to have enough examples of each class you are trying to predict. <strong>Make sure that your test and dev sets are from same statistical distribution.</strong></p><p>For example, if you are trying to predict if there’s a dog or a cat on pictures, your training set should be able to learn what a dog is and what a cat is. It should have both examples in its dataset. So should it be in the cross validation and test sets.</p><p><strong>4. Define your metrics 📊</strong></p><p>Now, you should have your problem defined and your dataset ready to fuel your neural network. However, it’s still not the time for you to code (I know you wanted to). It’s time to define the metrics you want to achieve with your project: <strong>what should be the quality of the answer given by your algorithm?</strong></p><p>It can be difficult to have a sense of what is possible or not. That’s why it’s important to take a look at <strong>recent academic papers </strong>(on <a href="https://arxiv.org/">arxiv</a> or <a href="https://scholar.google.fr/">google scholar</a>) on the domain you’re working on and check <strong>what metrics are being used and what their results are</strong>.</p><p>For example, if you are working on a sum-up problem, check the <a href="https://en.wikipedia.org/wiki/ROUGE_(metric)">ROUGE</a> metric.</p><p>Here is a cheat sheet of binary classification metrics you can use for your project: <a href="http://www.damienfrancois.be/blog/files/modelperfcheatsheet.pdf">http://www.damienfrancois.be/blog/files/modelperfcheatsheet.pdf</a>.</p><p>Sometimes it can be more costly to make one kind of a mistake than another. Let’s say you are working on a rare disease classifier. This disease only happens at 0.0001% of your patients. Thus, if we create a simple model always predicting that the disease is not present, we’ll have a very good accuracy. However, this method is really dangerous for the potential ill-patients. Rather than measuring the error rate of our classifier, we should measure its <em>Recall</em> and its <em>Precision</em>.</p><blockquote>The <strong>Recall</strong> of our classifier is the number of positive results predicted divided by the total number of positive elements.</blockquote><blockquote><strong>It measures how many positive items we have missed during our prediction.</strong></blockquote><p>In order to achieve a 100% Recall rate, we should never be wrong when predicting that someone is ill.</p><blockquote>The <strong>Precision</strong> of our classifier is the number of correct predicted positive results divided by the total number of predicted positive results.</blockquote><blockquote><strong>It measures how many negative items we have missed during our prediction.</strong></blockquote><p>To achieve a 100% Precision rate, we should never be wrong when predicting that someone is not ill.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*kaqtNALKZujx1FGlbK11OQ.png" /><figcaption>Image from Wikipedia’s Precision and Recall article</figcaption></figure><p>It is easy to have a 100% Precision or Recall rate (separately, without looking at the other one). That’s why we usually try to maximize the following <strong>F score:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*hu3PK-eVWvL8pFaIayIIOg.jpeg" /></figure><p>You can also define your model <strong>not always to answer</strong>. This can be useful if you do not want your machine learning algorithm to predict a wrong answer.</p><p>For example, if you are working on a chatbot answering your customers’ questions, this chatbot will not always be able to select the right template to use to answer. What should it do? You can define an accuracy threshold under which your chatbot will simply not answer.</p><p>This score is called “<strong>coverage</strong>”, it’s the percentage of predictions your algorithm can answer.</p><p><strong>5. Establish a baseline</strong></p><p>A <strong>baseline is the simplest method you can think of, that solves your problem</strong>. It can use heuristics, simple statistics, logistic regression, randomness, regular expressions, etc. The goal of the baseline is to have a reference metric you should beat with your ML algorithm.</p><p>By having a look at Scikit-learn’s <a href="http://scikit-learn.org/stable/modules/model_evaluation.html#dummy-estimators">dummy estimators</a>, here are a few examples for a classifying problem:</p><ul><li><strong>Stratified:</strong> generates random predictions by respecting the training set class distribution.</li><li><strong>Most frequent:</strong> always predicts the most frequent label in the training set.</li><li><strong>Prior:</strong> always predicts the class that maximizes the class prior.</li><li><strong>Uniform:</strong> generates predictions uniformly at random.</li><li><strong>Constant:</strong> always predicts a constant label that is provided by the user.</li></ul><p>If you are working on a NLP problem, it can also be a regular expression predicting the class some text belongs to.</p><p>Run your baseline on your test set and compute your first metrics you defined on the previous step. Keep those metrics in mind as you’ll soon want to go way ahead of them!</p><p>If it already beats your expectations and your defined goals, you might be reconsidering your problem 🕵.</p><p>Here are our first steps when working on a new machine learning project. You can find the <a href="https://blog.metaflow.fr/10-steps-to-bootstrap-your-machine-learning-project-part-2-b6be78444c70#.oznze8yl3">five last steps here</a>.</p><p>Share your own methodology in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa7e1031f5b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/metaflow-ai/10-steps-to-bootstrap-your-machine-learning-project-part-1-aa7e1031f5b1">10 steps to bootstrap your machine learning project (part 1)</a> was originally published in <a href="https://medium.com/metaflow-ai">metaflow-ai</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>