• <acronym id="sswva"></acronym><label id="sswva"><legend id="sswva"></legend></label>
      1. <output id="sswva"></output><var id="sswva"><ol id="sswva"></ol></var>

          <acronym id="sswva"></acronym>
          1. home > Research&Insights > Understanding a Machine Learning workflow through food

            Understanding a Machine Learning workflow through food

            Through food?! Yes, you got that right, through food! :-)

            Imagine yourself ordering a pizza and, after a short while, getting that nice, warm and delicious pizza delivered to your home.

            Have you ever wondered the workflow behind getting such a pizza delivered to your home? I mean, the full workflow, from the sowing of tomato seeds to the bike rider buzzing at your door! It turns out, it is not so different from a Machine Learning workflow.

            Really! Let’s check it out!

            This post draws inspiration from a talk given by Cassie Kozyrkov, Chief Decision Scientist at Google, at the Data Natives Conference in Berlin.

            1. Sowing

            The farmer sows the seeds that will grow to become some of the ingredients to our pizza, like the tomatoes.

            This is equivalent to the data generating process, be it a user action, be it movement, heat or noise triggering a sensor, for instance.

            2. Harvesting

            Then it comes the time for the harvest, that is, when the vegetables or fruits are ripe.

            This is equivalent to the data collection, meaning the browser or sensor will translate the user action or the event that triggered the sensor into actual data.

            3. Transporting

            After the harvest, the products must be transported to their destination to be used as ingredients in our pizza.

            This is equivalent to ingesting the data into a repository where its going be fetched from later, like a database or data lake.

            4. Choosing Appliances and Utensils

            For every ingredient, there is the most appropriate utensil for handling it. If you need to slice, use a knife. If you need to stir, a spoon. The same reasoning is valid for the appliances: if you need to bake, use an oven. If you need to fry, a stove. You can also use a more sophisticated appliance like a microwave, with many, many more available options for setting it up.

            Sometimes, it is even better to use a simpler appliance?—?have you ever seen a restaurant advertise “microwaved pizzas”?! I haven’t!

            In Machine Learning, utensils are techniques for preprocessing the data, while the appliances are the algorithms, like a Linear Regression or a Random Forest. You can also use a microwave, I mean, Deep Learning. The different options available are the hyper-parameters. There are only a few in simple appliances, I mean, algorithms. But there are many, many more in a sophisticated one. Besides, there is no guarantee a sophisticated algorithm will deliver a better performance (or do you like microwaved pizzas better?!). So, choose your algorithms wisely.

            5. Choosing a Recipe

            It is not enough to have ingredients and appliances. You also need a recipe, which has all the steps you need to follow to prepare your dish.

            This is your model. And no, your model is not the same as your algorithm. The model includes all pre- and post-processing required by your algorithm. And, talking about pre-processing…

            6. Preparing the Ingredients

            I bet you the first instructions in most recipes are like: “slice this”, “peel that” and so on. They don’t tell you to wash the vegetables, because that’s a given?—?no one wants to eat dirty vegetables, right?

            Well, the same holds true for data. No one wants dirty data. You have to clean it , that is, handling missing values and outliers. And then you have to peel it and slice it, I mean, pre-process it, like encoding categorical variables (male or female, for instance) into numeric ones (0 or 1).

            No one likes that part. Neither the data scientists nor the cooks (I guess).

            7. Special Preparations

            Sometimes you can get creative with your ingredients to achieve either a better taste or a more sophisticated presentation.

            You can dry-age a steak for a different flavor or carve a carrot to look like a rose and place it on top of your dish :-)

            This is feature engineering! It is an important step that may substantially improve the performance of your model, if done in a clever way.

            Pretty much every data scientist enjoys that part. I guess the cooks like it too.

            8. Cooking

            The fundamental step?—?without actually cooking, there is no dish. Obviously. You put the prepared ingredients into the appliance, adjust the heat and wait a while before checking it again.

            This is the training of your model. You feed the data to your algorithm, adjust its hyper-parameters and wait a while before checking it again.

            9. Tasting

            Even if you follow a recipe to the letter, you cannot guarantee everything is exactly right. So, how do you know if you got it right? You taste it! If it is not good, you may add more salt to try and fix it. You may also change the temperature. But you keep on cooking!

            Unfortunately, sometimes your pizza is going to burn, or taste horribly no matter what you do to try to salvage it. You throw it in the garbage, learn from your mistakes and start over.

            Hopefully, persistence and a bit of luck will produce a delicious pizza :-)

            Tasting is evaluating. You need to evaluate your model to check if it is doing alright. If not, you may need to add more features. You may also change a hyper-parameter. But you keep on training!

            Unfortunately, sometimes your model is not going to converge to a solution, or make horrible predictions no matter what you do to try to salvage it. You discard your model, learn from your mistakes and start over.

            Hopefully, persistence and a bit of luck will result in a high-performing model :-)

            10. Delivering

            From the point of the view of the cook, his/her work is done. He/she cooked a delicious pizza. Period.

            But if the pizza does not get delivered nicely and in time to the customer, the pizzeria is going out of business and the cook is losing his/her job.

            After the pizza is cooked, it must be promptly packaged to keep it warm and carefully handled to not look all squishy when it reaches the hungry customer. If the bike rider doesn’t reach his/her destination, loses the pizza along the way or shake it beyond recognition, all cooking effort is good for nothing.

            Delivering is deployment. Not pizzas, but predictions. Predictions, like pizzas, must be packaged, not in boxes, but as data products, so they can be delivered to the eager customers. If the pipeline fails, breaks along the way or modifies the predictions in any way, all model training and evaluation is good for nothing.

            That’s it! Machine Learning is like cooking food?—?there are several people involved in the process and it takes a lot of effort, but the final result can be delicious!

            Just a few takeaways:

            if ingredients are bad, the dish is going to be bad?—?no recipe can fix that and certainly, no appliance, either;
            if you are a cook, never forget that, without delivering, there is no point in cooking, as no one will ever taste your delicious food;
            if you are a restaurant owner, don’t try to impose appliances on your cook?—?sometimes microwaves are not the best choice?—?and you’ll get a very unhappy cook if he/she spends all his/her time washing and slicing ingredients…
            I don’t know about you, but I feel like ordering a pizza now! :-)

            By Daniel Godoy

            霞浦| 孤家子| 许昌| 吉首| 子洲| 云霄| 石台| 高州| 商丘| 高邮| 旬阳| 水城| 永春| 绥化| 夏邑| 黔阳| 周至| 蒙山| 罗甸| 梓潼| 南充| 尚义| 汉川| 五常| 陆川| 息烽| 新巴尔虎左旗| 正宁| 定安| 正兰旗| 兴山| 通化| 安仁| 即墨| 全南| 柳州| 尤溪| 迁西| 那日图| 双城| 法库| 融水| 南澳| 吴县东山| 和平| 仁寿| 乡宁| 宾川| 库米什| 江永| 藁城| 莎车| 广丰| 阿拉善左旗| 罗山| 镇宁| 永顺| 宣威| 名山| 大方| 容县| 商丘| 石岛| 额济纳旗| 大兴安岭| 佛山| 昆山| 治多| 沅陵| 辽源| 遂平| 仁和| 东沙岛| 巴雅尔吐胡硕| 新巴尔虎右旗| 海东| 吉木萨尔| 龙州| 汤原| 和平| 定安| 洛阳| 本溪县| 遂川| 溧水| 城口| 惠来| 玉溪| 宝鸡县| 济宁| 崇武| 拜泉| 乌兰| 灵寿| 保德| 石岛| 茫崖| 合肥| 昌图| 邵武| 焉耆| 佛山| 浪卡子| 宝应| 江油| 根河| 两当| 番禺| 滨州| 洛隆| 仪陇| 雷州| 平南| 赣州| 桃园| 成武| 太原| 霍城| 襄垣| 苍山| 西沙| 民丰| 习水| 锡林浩特| 湖口| 陵水| 满洲里| 安阳| 台安| 普兰店| 定南| 蚌埠| 墨玉| 四子王旗| 吕梁| 皮口| 黔江| 桂林农试站| 会宁| 汤河口| 洛隆| 双牌| 鸡西| 察哈尔右翼前旗| 绥宁| 厦门| 栾川| 英吉沙| 太原北郊| 鄂托克前旗| 贺州| 白云| 长清| 赤壁| 武川| 启东| 平顺| 索县| 蓬溪| 铜锣湾| 敖汉旗| 帕里| 舒城| 海盐| 柳州| 拐子湖| 中山| 新龙| 莎车| 台安| 东安| 盘县| 黑水| 邹城| 开平| 通榆| 阿里| 雷州| 平罗| 丰润| 靖远| 洞头| 邵阳县| 海东| 塔城| 凤阳| 龙井| 廉江| 衡东| 乌斯太| 驻马店| 祁县| 丹江口| 西峡| 南丹| 岳西| 乌什| 繁昌| 罗子沟| 利川| 江口| 剑阁| 常山| 黄平旧洲| 汤河口| 兴平| 镶黄旗| 康县| 安阳| 五河| 清河| 景德镇| 桐乡| 章党| 吴江| 崇阳| 涠洲岛| 吉水| 会昌| 西林| 临沂| 鄂尔多斯| 连城| 台州| 阿尔山| 石嘴山| 察哈尔右翼前旗| 新源| 通辽钱家店| 邵阳| 天等| 通渭| 白杨沟| 鹰潭| 武功| 墨江| 新会| 锡林浩特| 营口| 株洲县| 野牛沟| 宜丰| 三水| 永署礁| 多伦| 呼兰| 邯郸| 焦作| 且末| 砚山| 兰考| 重庆| 米脂| 遂川| 星子| 郑州| 宜宾县| 汤原| 眉山| 徐家汇| 阿克苏| 惠阳| 合阳| 寻乌| 淮阴| 喀什| 阿拉善左旗| 祥云| 卓资| 天柱| 陇县| 万宁| 常宁| 桑植| 乌海| 邯郸| 吴江| 韶山| 米泉| 驻马店| 马尔康| 交口| 福州郊区| 高平| 鄂托克旗| 上杭| 瑞金| 湘阴| 梅州| 中卫| 江宁| 塔河| 费县| 古蔺| 顺昌| 酒泉| 隆昌| 广水| 成都| 绥阳| 永德| 绥德| 南溪| 增城| 华山| 四平| 甘泉| 化德| 双峰| 濮阳| 仙居| 黄冈| 湟源| 榆社| 乐昌| 郎溪| 香格里拉| 米脂| 桐城| 建水| 安龙| 八里罕| 兴安| 河口| 静宁| 夏津| 无为| 谷城| 常德| 莱芜| 临沧| 临潭| 新都| 河间| 明光| 葫芦岛| 前郭| 富源| 楚州| 阜平| 茶陵| 留坝| 衡山| 集安| 新民| 和田| 沁水| 夏河| 太仆寺旗| 息县| 寿光| 华阴| 宣化| 佳木斯| 万全| 辽源| 温岭| 正宁| 草河口| 瑞丽| 吴县东山| 陇县| 上饶县| 乌恰| 江津| 莒县| 泰兴| 龙泉驿| 和顺| 滨州| 澄城| 绥德| 湘乡| 长寿| 桐柏| 汕尾| 高淳| 古蔺| 江夏| 兴义| 米泉| 和静| 德庆| 曲阳| 南丰| 岑溪| 吉县| 惠阳| 兴化| 铜锣湾| 江津| 清水河| 平定| 乌审召| 连州| 石屏| 博湖| 前郭| 五原| 鄂温克旗